/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    'cn-beijing' = 'emr.aliyuncs.com',
    'cn-hangzhou' = 'emr.aliyuncs.com',
    'cn-shanghai' = 'emr.aliyuncs.com',
    'cn-shenzhen' = 'emr.aliyuncs.com',
    'ap-southeast-1' = 'emr.aliyuncs.com',
    'us-west-1' = 'emr.aliyuncs.com',
    'cn-shanghai-finance-1' = 'emr.aliyuncs.com',
    'cn-shenzhen-finance-1' = 'emr.aliyuncs.com',
    'cn-north-2-gov-1' = 'emr.aliyuncs.com',
    'ap-northeast-2-pop' = 'emr.aliyuncs.com',
    'cn-beijing-finance-1' = 'emr.aliyuncs.com',
    'cn-beijing-finance-pop' = 'emr.aliyuncs.com',
    'cn-beijing-gov-1' = 'emr.aliyuncs.com',
    'cn-beijing-nu16-b01' = 'emr.aliyuncs.com',
    'cn-edge-1' = 'emr.aliyuncs.com',
    'cn-fujian' = 'emr.aliyuncs.com',
    'cn-haidian-cm12-c01' = 'emr.aliyuncs.com',
    'cn-hangzhou-bj-b01' = 'emr.aliyuncs.com',
    'cn-hangzhou-finance' = 'emr.aliyuncs.com',
    'cn-hangzhou-internal-prod-1' = 'emr.aliyuncs.com',
    'cn-hangzhou-internal-test-1' = 'emr.aliyuncs.com',
    'cn-hangzhou-internal-test-2' = 'emr.aliyuncs.com',
    'cn-hangzhou-internal-test-3' = 'emr.aliyuncs.com',
    'cn-hangzhou-test-306' = 'emr.aliyuncs.com',
    'cn-hongkong-finance-pop' = 'emr.aliyuncs.com',
    'cn-huhehaote-nebula-1' = 'emr.aliyuncs.com',
    'cn-qingdao-nebula' = 'emr.aliyuncs.com',
    'cn-shanghai-et15-b01' = 'emr.aliyuncs.com',
    'cn-shanghai-et2-b01' = 'emr.aliyuncs.com',
    'cn-shanghai-inner' = 'emr.aliyuncs.com',
    'cn-shanghai-internal-test-1' = 'emr.aliyuncs.com',
    'cn-shenzhen-inner' = 'emr.aliyuncs.com',
    'cn-shenzhen-st4-d01' = 'emr.aliyuncs.com',
    'cn-shenzhen-su18-b01' = 'emr.aliyuncs.com',
    'cn-wuhan' = 'emr.aliyuncs.com',
    'cn-yushanfang' = 'emr.aliyuncs.com',
    'cn-zhangbei' = 'emr.aliyuncs.com',
    'cn-zhangbei-na61-b01' = 'emr.aliyuncs.com',
    'cn-zhangjiakou-na62-a01' = 'emr.aliyuncs.com',
    'cn-zhengzhou-nebula-1' = 'emr.aliyuncs.com',
    'eu-west-1-oxs' = 'emr.aliyuncs.com',
    'rus-west-1-pop' = 'emr.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('emr', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AckConfig {
  ackInstanceId?: string(name='AckInstanceId', description='ack集群id'),
  customAnnotations?: [
    Tag
  ](name='CustomAnnotations'),
  customLabels?: [
    Tag
  ](name='CustomLabels'),
  dataDiskSize?: int32(name='DataDiskSize'),
  dataDiskStorageClass?: string(name='DataDiskStorageClass'),
  limitCpu?: float(name='LimitCpu', description='Pod的CPU限制值。'),
  limitMemory?: float(name='LimitMemory', description='Pod的内存限制值。'),
  mountHostCgroup?: boolean(name='MountHostCgroup'),
  namespace?: string(name='Namespace', description='ack 命名空间'),
  nodeAffinity?: string(name='NodeAffinity'),
  nodeSelectors?: [
    Tag
  ](name='NodeSelectors', description='ack的节点标签限制'),
  podAffinity?: string(name='PodAffinity'),
  podAntiAffinity?: string(name='PodAntiAffinity'),
  preStartCommand?: [ string ](name='PreStartCommand'),
  pvcs?: [ 
    {
      dataDiskSize?: long(name='DataDiskSize'),
      dataDiskStorageClass?: string(name='DataDiskStorageClass'),
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='Pvcs'),
  requestCpu?: float(name='RequestCpu', description='Pod的CPU请求值'),
  requestMemory?: float(name='RequestMemory', description='Pod的内存请求值。'),
  tolerations?: [
    Toleration
  ](name='Tolerations', description='ack的节点污点容忍'),
  volumeMounts?: [ 
    {
      name?: string(name='Name'),
      path?: string(name='Path'),
    }
  ](name='VolumeMounts'),
  volumes?: [ 
    {
      name?: string(name='Name'),
      path?: string(name='Path'),
      type?: string(name='Type'),
    }
  ](name='Volumes'),
}

model AckNode {
  nodeId?: string(name='NodeId', description='节点ID。', example='i-bp1cudc25w2bfwl5****'),
  nodeSelector?: AckNodeSelector(name='NodeSelector', description='ACK节点选择器。'),
}

model AckNodePool {
  nodePoolId?: string(name='NodePoolId', description='节点池ID。', example='npe76629caa1b14a73bf3e47c6d481****'),
  nodeSelector?: AckNodeSelector(name='NodeSelector', description='ACK节点选择器。'),
}

model AckNodeSelector {
  labels?: [ 
    {
      key?: string(name='Key', description='标签键。', example='emr'),
      value?: string(name='Value', description='标签值。', example='true'),
    }
  ](name='Labels', description='污点列表。'),
  taints?: [ 
    {
      effect?: string(name='Effect', description='污点效果。'),
      key?: string(name='Key', description='污点键。', example='emr'),
      value?: string(name='Value', description='污点值。', example='true'),
    }
  ](name='Taints', description='污点列表。'),
}

model ApiTemplate {
  apiName?: string(name='ApiName', description='接口名。', example='CreateCluster'),
  content?: string(name='Content', description='模版接口参数。'),
  regionId?: string(name='RegionId', description='区域ID。', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='资源组ID。', example='rg-acfmzabjyop****'),
  status?: string(name='Status', description='模板状态。', example='READY'),
  templateId?: string(name='TemplateId', description='模板ID。', example='AT-Af***'),
  templateName?: string(name='TemplateName', description='模板ID。', example='AT-Af***'),
}

model Application {
  applicationName?: string(name='ApplicationName', description='应用名称。从EMR控制台集群创建页面可查看到指定发行版的应用名称列表。

This parameter is required.', example='HDFS'),
}

model ApplicationConfig {
  applicationName?: string(name='ApplicationName', description='应用名称。从EMR控制台集群创建页面可查看到指定发行版的应用名称列表。

This parameter is required.', example='HDFS'),
  configFileName?: string(name='ConfigFileName', description='应用配置文件名。

This parameter is required.', example='hdfs-site.xml'),
  configItemKey?: string(name='ConfigItemKey', description='配置项键。

This parameter is required.', example='dfs.namenode.checkpoint.period'),
  configItemValue?: string(name='ConfigItemValue', description='配置项值。', example='3600s'),
  configScope?: string(name='ConfigScope', description='配置范围。取值范围：
- CLUSTER：集群级别。
- NODE_GROUP：节点组级别。

默认值：CLUSTER。', example='NODE_GROUP'),
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。ConfigScope取值NODE_GROUP时，该参数生效。NodeGroupId参数优先级高于NodeGroupName。', example='ng-869471354ecd****'),
  nodeGroupName?: string(name='NodeGroupName', description='节点组名称。ConfigScope取值NODE_GROUP时，且参数NodeGroupId为空时生效，该参数生效。', example='core-1'),
}

model ApplicationConfigFile {
  applicationName?: string(name='ApplicationName', description='应用名称。

This parameter is required.', example='HDFS'),
  configFileName?: string(name='ConfigFileName', description='配置文件名称。

This parameter is required.', example='core-site.xml'),
}

model ApplicationConfigParam {
  configAction?: string(name='ConfigAction', example='DELETE'),
  configFileName?: string(name='ConfigFileName', example='hdfs-site.xml'),
  configItemDescription?: string(name='ConfigItemDescription', example='namenode checkpoint period'),
  configItemKey?: string(name='ConfigItemKey', example='dfs.namenode.checkpoint.period'),
  configItemValue?: string(name='ConfigItemValue', example='3600s'),
  configScope?: string(name='ConfigScope'),
  effectiveActions?: string(name='EffectiveActions', example='RESTART'),
  effectiveType?: string(name='EffectiveType', example='MANUAL'),
  nodeGroupId?: string(name='NodeGroupId', example='G-DE1CF4661E09****'),
  nodeId?: string(name='NodeId', example='i-bp10h9rezawz1i4o****'),
}

model Attribute {
  key?: string(name='Key', description='键。', example='currentYarnRangerPluginState'),
  value?: string(name='Value', description='值。', example='true'),
}

model AutoRenewInstance {
  autoRenew?: boolean(name='AutoRenew', description='自动续费。', example='true'),
  autoRenewDuration?: int32(name='AutoRenewDuration', description='自动续费时长。', example='12'),
  autoRenewDurationUnit?: string(name='AutoRenewDurationUnit', description='自动付费时长单位。', example='Month'),
  emrAutoRenewDuration?: int32(name='EmrAutoRenewDuration', description='emr实例自动续费时长。', example='12'),
  emrAutoRenewDurationUnit?: string(name='EmrAutoRenewDurationUnit', description='emr实例自动续费时长单位。', example='Month'),
  instanceId?: string(name='InstanceId', description='节点ID。

This parameter is required.', example='i-bp1cudc25w2bfwl5****'),
}

model AutoRenewInstanceParam {
  autoRenew?: string(name='AutoRenew'),
  autoRenewDuration?: string(name='AutoRenewDuration'),
  autoRenewDurationUnit?: string(name='AutoRenewDurationUnit'),
  instanceId?: string(name='InstanceId'),
}

model AutoScalingConstraints {
  autoScalingMetricUnits?: [
    MetricUnitValue
  ](name='AutoScalingMetricUnits', description='按负载伸缩指标单位描述。'),
  defaultMetricTriggeredRules?: [
    ScalingRule
  ](name='DefaultMetricTriggeredRules', description='默认按负载弹性伸缩规则列表'),
  maxAdjustmentValue?: int32(name='MaxAdjustmentValue', description='单次伸缩活动最大扩缩容节点数量。', example='1000'),
  maxByLoadRuleCount?: int32(name='MaxByLoadRuleCount', description='按负载规则数量最大值。', example='10'),
  maxByTimeRuleCount?: int32(name='MaxByTimeRuleCount', description='按时间规则数量最大值。', example='10'),
  supportMetricTags?: [ 
    {
      metricName?: string(name='MetricName', description='指标名称。'),
      tags?: [
        Tag
      ](name='Tags', description='指标Tag。'),
    }
  ](name='SupportMetricTags', description='支持的按负载弹性伸缩指标Tag列表。'),
  supportMetrics?: [ string ](name='SupportMetrics', description='支持的按负载弹性伸缩指标列表。', example='["YarnRootAvailableMemoryUsage","YarnRootAvailableVcores"]'),
  supportRuleTypes?: [ string ](name='SupportRuleTypes', description='支持的弹性伸缩规则类型。', example='["TIME_TRIGGER","METRICS_TRIGGER"]'),
}

model AutoScalingPolicy {
  constraints?: {
    maxCapacity?: int32(name='MaxCapacity'),
    minCapacity?: int32(name='MinCapacity'),
  }(name='Constraints'),
  scalingRules?: [
    ScalingRule
  ](name='ScalingRules'),
}

model ByLoadScalingRule {
  comparisonOperator?: string(name='ComparisonOperator', description='比较符。

This parameter is required.', example='LT'),
  coolDownInterval?: int32(name='CoolDownInterval'),
  evaluationCount?: int32(name='EvaluationCount', description='统计次数。

This parameter is required.', example='2'),
  metricName?: string(name='MetricName', description='指标名称。指标名称需要在 ListAutoScalingMetrics 接口返回的指标名称列表中。

This parameter is required.', example='yarn_resourcemanager_root_availablememoryusage'),
  statistics?: string(name='Statistics', description='统计量名称。

This parameter is required.', example='AVG'),
  threshold?: double(name='Threshold', description='阈值。

This parameter is required.', example='12.5'),
  timeWindow?: int32(name='TimeWindow', description='统计窗口。单位为秒。

This parameter is required.', example='30'),
}

model ByLoadScalingRuleSpec {
  comparisonOperator?: string(name='ComparisonOperator', description='比较符。

This parameter is required.', example='LT'),
  evaluationCount?: int32(name='EvaluationCount', description='统计次数。

This parameter is required.', example='2'),
  metricName?: string(name='MetricName', description='指标名称。指标名称需要在 ListAutoScalingMetrics 接口返回的指标名称列表中。

This parameter is required.', example='yarn_resourcemanager_root_availablememoryusage'),
  statistics?: string(name='Statistics', description='统计量名称。

This parameter is required.', example='AVG'),
  threshold?: double(name='Threshold', description='阈值。

This parameter is required.', example='12.5'),
  timeWindow?: int32(name='TimeWindow', description='统计窗口。单位为秒。

This parameter is required.', example='30'),
}

model ByTimeScalingRule {
  endTime?: long(name='EndTime', description='重复执行定时任务的结束时间戳。单位为毫秒。', example='1639714800000'),
  launchExpirationTime?: int32(name='LaunchExpirationTime', description='定时任务触发操作失败后，在此时间内重试。单位为秒，取值范围：0~3600。', example='600'),
  launchTime?: long(name='LaunchTime', description='启动时间戳。单位为毫秒。

This parameter is required.', example='1639714634819'),
  recurrenceType?: string(name='RecurrenceType', description='指定时间规则的执行类型。', example='WEEKLY'),
  recurrenceValue?: string(name='RecurrenceValue', description='重复执行定时任务的数值。具体取值取决于 recurrenceType 设置。
- recurrenceType 取 MINUTELY 时，只能填一个数值，取值范围：1~1440。
- recurrenceType 取 HOURLY 时，只能填一个数值，取值范围：1~24。
- recurrenceType 取 DAILY 时，只能填一个数值，取值范围：1~31。
- recurrenceType 取 WEEKLY 时，可以填入多个值，填多个值时使用英文逗号（,）分隔。周一到周天分别用MON，TUE，WED，THU，FRI，SAT，SUN代替。 比如 MON,FRI,SUN 代表周一、周五、周天。
- recurrenceType 取 MONTHLY 时，格式为A-B或者A,B。A、B的取值范围为1~31，如果使用A-B时B必须大于A。', example='MON,FRI,SUN'),
}

model ByTimeScalingRuleSpec {
  endTime?: long(name='EndTime', description='重复执行定时任务的结束时间戳。单位为毫秒。', example='1639714800000'),
  launchTime?: long(name='LaunchTime', description='启动时间戳。单位为毫秒。

This parameter is required.', example='1639714634819'),
  recurrenceType?: string(name='RecurrenceType', description='指定时间规则的执行类型。', example='WEEKLY'),
  recurrenceValue?: string(name='RecurrenceValue', description='重复执行定时任务的数值。具体取值取决于 recurrenceType 设置。', example='MON,FRI,SUN'),
}

model ClickhouseConf {
  initialReplica?: int32(name='InitialReplica'),
  initialShard?: int32(name='InitialShard'),
  newNodeCount?: int32(name='NewNodeCount'),
  resizeType?: string(name='ResizeType'),
}

model Cluster {
  clusterId?: string(name='ClusterId', description='集群ID。', example='c-b933c5aac8fe****'),
  clusterName?: string(name='ClusterName', description='集群名称。', example='emrtest'),
  clusterState?: string(name='ClusterState', description='集群状态。', example='RUNNING'),
  clusterType?: string(name='ClusterType', description='集群类型。', example='DATALAKE'),
  createTime?: long(name='CreateTime', description='创建时间。', example='1592837465784'),
  deletionProtection?: boolean(name='DeletionProtection', example='false'),
  deployMode?: string(name='DeployMode', description='部署模式。', example='HA'),
  description?: string(name='Description'),
  emrDefaultRole?: string(name='EmrDefaultRole', description='EMR默认角色。', example='AliyunEMRDefaultRole'),
  endTime?: long(name='EndTime', description='删除时间。', example='1592837465784'),
  expireTime?: long(name='ExpireTime', description='过期时间。', example='1592837465784'),
  nodeAttributes?: NodeAttributes(name='NodeAttributes', description='节点属性。'),
  paymentType?: string(name='PaymentType', description='付费类型。', example='PayAsYouGo'),
  readyTime?: long(name='ReadyTime', description='可用时间。', example='1592837465784'),
  regionId?: string(name='RegionId', description='地域ID。', example='cn-hangzhou'),
  releaseVersion?: string(name='ReleaseVersion', description='EMR发行版。', example='EMR-5.3.0'),
  resourceGroupId?: string(name='ResourceGroupId', description='资源组ID。', example='rg-acfmzabjyop****'),
  securityMode?: string(name='SecurityMode', description='Kerberos安全模式。', example='NORMAL'),
  stateChangeReason?: ClusterStateChangeReason(name='StateChangeReason'),
  subscriptionConfig?: SubscriptionConfig(name='SubscriptionConfig', description='预付费配置。'),
  tags?: [
    Tag
  ](name='Tags', description='集群标签。'),
}

model ClusterScript {
  executionFailStrategy?: string(name='ExecutionFailStrategy', example='取值:FAILED_CONTINUE, FAILED_BLOCKED'),
  executionMoment?: string(name='ExecutionMoment', example='取值:BEFORE_INSTALL, AFTER_STARTED'),
  nodeSelect?: NodeSelector(name='NodeSelect'),
  priority?: int32(name='Priority'),
  scriptArgs?: string(name='ScriptArgs'),
  scriptName?: string(name='ScriptName'),
  scriptPath?: string(name='ScriptPath'),
}

model ClusterStateChangeReason {
  code?: string(name='Code', description='状态码。取值范围：
- UserRequest：用户请求。
- OutOfStock：请求的ECS实例类型无库存。
- NotAuthorized：无权限。
- QuotaExceeded：Quota超出。
- OperationDenied：操作被拒绝。
- AccountException：账号异常。
- NodeFailure：ECS节点异常。
- BootstrapFailure：引导失败。
- ValidationFail：业务逻辑校验失败。
- ServiceFailure：依赖的其他服务失败。
- InternalError：内部错误。', example='OutOfStock'),
  message?: string(name='Message', description='状态变化信息。', example='The requested resource is sold out in the specified zone, try other types of resources or other regions and zones.'),
}

model ClusterSummary {
  clusterId?: string(name='ClusterId', description='集群ID。', example='c-b933c5aac8fe****'),
  clusterName?: string(name='ClusterName', description='集群名称。', example='emrtest'),
  clusterState?: string(name='ClusterState', description='集群状态。取值范围：
- STARTING：启动中。
- START_FAILED：启动失败。
- BOOTSTRAPPING：引导操作初始化。
- RUNNING：运行中。
- TERMINATING：终止中。
- TERMINATED：已终止。
- TERMINATED_WITH_ERRORS：发生异常导致终止。
- TERMINATE_FAILED：终止失败。', example='RUNNING'),
  clusterType?: string(name='ClusterType', description='集群类型。取值范围：
- DATALAKE：新版数据湖。
- OLAP：数据分析。
- DATAFLOW：实时数据流。
- DATASERVING：数据服务。', example='DATALAKE'),
  createTime?: long(name='CreateTime', description='创建时间。', example='1592837465784'),
  deletionProtection?: boolean(name='DeletionProtection'),
  description?: string(name='Description'),
  emrDefaultRole?: string(name='EmrDefaultRole', description='EMR服务角色。'),
  endTime?: long(name='EndTime', description='删除时间。', example='1592837465784'),
  expireTime?: long(name='ExpireTime', description='过期时间。', example='1592837465784'),
  paymentType?: string(name='PaymentType', description='付费类型。取值范围：
- PayAsYouGo：后付费。
- Subscription：预付费。', example='PayAsYouGo'),
  readyTime?: long(name='ReadyTime', description='可用时间。', example='1592837465784'),
  releaseVersion?: string(name='ReleaseVersion', description='EMR发行版。', example='EMR-5.8.0'),
  resourceGroupId?: string(name='ResourceGroupId', description='资源组ID。', example='rg-acfmzabjyop****'),
  stateChangeReason?: ClusterStateChangeReason(name='StateChangeReason', description='失败原因。'),
  tags?: [
    Tag
  ](name='Tags', description='标签列表。'),
}

model ComponentInstanceSelector {
  actionScope?: string(name='ActionScope', deprecated=true),
  applicationName?: string(name='ApplicationName', description='应用名称。', example='HDFS'),
  componentInstances?: [ 
    {
      applicationName?: string(name='ApplicationName', description='应用名称。', example='HDFS'),
      componentName?: string(name='ComponentName', description='组件名称。', example='DataNode'),
      nodeId?: string(name='NodeId', description='节点ID。', example='i-bp1cudc25w2bfwl5****'),
    }
  ](name='ComponentInstances', description='组件实例列表。actionScope为COPONENT_INSTANCE时使用。'),
  components?: [ 
    {
      applicationName?: string(name='ApplicationName', description='应用名称。', example='HDFS'),
      componentName?: string(name='ComponentName', description='组件名称。', example='DataNode'),
    }
  ](name='Components', description='组件列表。
actionScope为COPONENT时使用。'),
  runActionScope?: string(name='RunActionScope', description='动作执行范围。取值范围：
- APPLICATION：应用级别。
- COMPONENT：组件级别。
- COMPONENT_INSTANCE：组件实例级别。

This parameter is required.', example='APPLICATION'),
}

model ComponentLayout {
  applicationName?: string(name='ApplicationName', description='应用名称。', example='HDFS'),
  componentName?: string(name='ComponentName', description='组件名称。', example='DataNode'),
  nodeSelector?: {
    nodeEndIndex?: int32(name='NodeEndIndex', description='节点结束编号，包含结束编号。', example='3'),
    nodeGroupId?: string(name='NodeGroupId', description='节点组ID。', example='G-F609686D45D4ABCD'),
    nodeGroupIndex?: int32(name='NodeGroupIndex', description='机器组下标编号。', example='1'),
    nodeGroupName?: string(name='NodeGroupName', description='机器组名。', example='master-1'),
    nodeGroupTypes?: [ string ](name='NodeGroupTypes', description='SelectType = NODE_GROUP 且 nodeGroupId 不存在时使用', example='[null]'),
    nodeNames?: [ string ](name='NodeNames', description='节点名称列表。', example='[null]'),
    nodeSelectType?: string(name='NodeSelectType', description='节点选择类型。

This parameter is required.', example='CLUSTER'),
    nodeStartIndex?: int32(name='NodeStartIndex', description='节点开始编号，包含开始编号。', example='1'),
  }(name='NodeSelector', description='节点选择器。'),
}

model ConfigEffectActions {
  configEffectAction?: string(name='ConfigEffectAction', description='配置生效动作。', example='restart'),
  configFiles?: [ string ](name='ConfigFiles', description='配置生效配置文件。', example='null'),
}

model ConvertNodeGroup {
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。', example='ng-869471354ecd****'),
  paymentDuration?: int32(name='PaymentDuration', description='付费时长。', example='12'),
  paymentDurationUnit?: string(name='PaymentDurationUnit', description='付费时长单位。', example='Month'),
  paymentType?: string(name='PaymentType', description='付费类型。', example='PayAsYouGo'),
}

model ConvertNodeGroupParam {
  nodeGroupId?: string(name='NodeGroupId', description='This parameter is required.'),
  paymentDuration?: long(name='PaymentDuration', description='This parameter is required.'),
  paymentDurationUnit?: string(name='PaymentDurationUnit'),
  paymentType?: string(name='PaymentType', description='This parameter is required.'),
}

model CostOptimizedConfig {
  onDemandBaseCapacity?: int32(name='OnDemandBaseCapacity', description='按量实例个数的最小值。节点组所需要按量实例个数的最小值，取值范围：0~1000。当按量实例个数少于该值时，将优先创建按量实例。

This parameter is required.', example='80'),
  onDemandPercentageAboveBaseCapacity?: int32(name='OnDemandPercentageAboveBaseCapacity', description='节点组满足最小按量实例OnDemandBaseCapacity要求后，超出的实例中按量实例应占的比例，取值范围：0～100。

This parameter is required.', example='80'),
  spotInstancePools?: int32(name='SpotInstancePools', description='指定可用实例规格的个数，伸缩组将按成本最低的多个规格均衡创建抢占式实例。取值范围：0~10。

This parameter is required.', example='2'),
}

model CreateNodeGroupParam {
  autoRenew?: boolean(name='AutoRenew', example='false'),
  autoRenewDuration?: int32(name='AutoRenewDuration', example='1'),
  autoRenewDurationUnit?: string(name='AutoRenewDurationUnit', example='Monthly'),
  dataDisks?: [
    DiskInfo
  ](name='DataDisks'),
  instanceTypes?: [ string ](name='InstanceTypes'),
  nodeCount?: int32(name='NodeCount', example='2'),
  nodeGroupName?: string(name='NodeGroupName', example='core-1'),
  nodeGroupType?: string(name='NodeGroupType', example='CORE'),
  nodeKeyPairName?: string(name='NodeKeyPairName', example='sshkey'),
  nodeRamRole?: string(name='NodeRamRole', example='AliyunEmrEcsDefaultRole'),
  nodeRootPassword?: string(name='NodeRootPassword', example='*******'),
  paymentDuration?: int32(name='PaymentDuration', example='1'),
  paymentDurationUnit?: string(name='PaymentDurationUnit', example='Monthly'),
  paymentType?: string(name='PaymentType', example='Subscription'),
  securityGroupId?: string(name='SecurityGroupId', example='sg-hp3abbae8lb6lmb1****'),
  spotStrategy?: string(name='SpotStrategy', example='NoSpot'),
  systemDisk?: SystemDiskParam(name='SystemDisk'),
  vSwitchIds?: [ string ](name='VSwitchIds'),
  withPublicIp?: boolean(name='WithPublicIp', example='true'),
  zoneId?: string(name='ZoneId', example='cn-hangzhou-e'),
}

model DataDisk {
  category?: string(name='Category', description='磁盘类型。

This parameter is required.', example='cloud_essd'),
  count?: int32(name='Count', description='每个节点磁盘数量。', example='5'),
  performanceLevel?: string(name='PerformanceLevel', description='创建ESSD云盘作为数据盘使用时，设置云盘的性能等级。取值范围：
- PL0：单盘最高随机读写IOPS 1万。
- PL1（默认）：单盘最高随机读写IOPS 5万。
- PL2：单盘最高随机读写IOPS 10万。
- PL3：单盘最高随机读写IOPS 100万。

默认值：PL1。', example='PL1'),
  size?: int32(name='Size', description='单位GB。

This parameter is required.', example='80'),
}

model DecreaseNodeGroupParam {
  nodeGroupId?: string(name='NodeGroupId', description='This parameter is required.', example='G-21E39B11837E****'),
  releaseInstanceIds?: [ string ](name='ReleaseInstanceIds', description='This parameter is required.'),
}

model DeploymentLayout {
  applicationName?: string(name='ApplicationName'),
  componentName?: string(name='ComponentName'),
  nodeSelector?: NodeSelector(name='NodeSelector'),
}

model DeploymentSetConstraints {
  defaultValue?: string(name='DefaultValue', description='默认值。', example='CLUSTER'),
  enableState?: string(name='EnableState', example='是否启用部署集限制策略'),
  replacementStrategy?: ReplacementStrategy(name='ReplacementStrategy', description='替换策略。'),
  values?: [ string ](name='Values', description='枚举值。', example='["CLUSTER","NODE_GROUP","NONE"]'),
}

model Disk {
  category?: string(name='Category', description='磁盘类型。', example='cloud_essd'),
  count?: int32(name='Count', description='每个节点磁盘数量。', example='5'),
  performanceLevel?: string(name='PerformanceLevel', description='性能级别。', example='S0'),
  size?: int32(name='Size', description='单位GB。', example='80'),
}

model DiskConstraints {
  categories?: [ string ](name='Categories', description='支持的磁盘类型。', example='["cloud_efficiency","cloud_ssd","cloud_essd","local_disk"]'),
  countConstraint?: ValueConstraints(name='CountConstraint', description='磁盘数量最小值。'),
  sizeConstraint?: ValueConstraints(name='SizeConstraint', description='磁盘容量限制。'),
}

model DiskInfo {
  category?: string(name='Category'),
  count?: int32(name='Count'),
  performanceLevel?: string(name='PerformanceLevel'),
  size?: int32(name='Size'),
}

model DiskSize {
  category?: string(name='Category', description='磁盘类型。

This parameter is required.', example='cloud_essd'),
  size?: int32(name='Size', description='单位GB。', example='80'),
}

model FailedReason {
  errorCode?: string(name='ErrorCode', description='错误码。', example='MissingParameter.InstanceType'),
  errorMessage?: string(name='ErrorMessage', description='错误信息。', example='The instance type is required.'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944abcd'),
}

model HealthSummary {
  badCount?: long(name='BadCount', example='2'),
  goodCount?: long(name='GoodCount', example='2'),
  noneCount?: long(name='NoneCount', example='0'),
  stoppedCount?: long(name='StoppedCount', example='2'),
  totalCount?: long(name='TotalCount', example='8'),
  unknownCount?: long(name='UnknownCount', example='0'),
  warningCount?: long(name='WarningCount', example='2'),
}

model IncreaseNodeGroup {
  description?: string(name='Description', description='描述。', example='描述'),
  nodeCount?: int32(name='NodeCount', description='节点数量。

This parameter is required.', example='3'),
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。

This parameter is required.', example='ng-869471354ecd****'),
  paymentDuration?: int32(name='PaymentDuration', description='付费时长。', example='12'),
  paymentDurationUnit?: string(name='PaymentDurationUnit', description='付费时长单位。', example='Month'),
  vSwitchId?: string(name='VSwitchId', description='虚拟机交换机ID。', example='vsw-hp35g7ya5ymw68mmg****'),
}

model IncreaseNodeGroupParam {
  nodeCount?: long(name='NodeCount'),
  nodeGroupId?: string(name='NodeGroupId'),
  paymentDuration?: int32(name='PaymentDuration'),
  paymentDurationUnit?: string(name='PaymentDurationUnit'),
  vSwitchId?: string(name='VSwitchId'),
}

model InstanceCategory {
  defaultValue?: string(name='DefaultValue', description='默认值。', example='CLUSTER'),
  keys?: [ string ](name='Keys', example='null'),
  values?: [ string ](name='Values', example='null'),
}

model InstanceType {
  cpuArchitecture?: string(name='CpuArchitecture', description='cpu架构。', example='X86'),
  cpuCore?: int32(name='CpuCore', description='vCPU内核数目。', example='4'),
  instanceCategory?: string(name='InstanceCategory', description='实例规格分类。取值范围：
- General-purpose： 通用型。
- Compute-optimized：计算型。
- Memory-optimized：内存型。
- Big data：大数据型。
- Local SSDs ：本地SSD型。
- High Clock Speed ：高主频型。
- Enhanced ：增强型。
- Shared：共享型。
- Compute-optimized with GPU ：GPU计算型。
- Visual Compute-optimized ：视觉计算型。
- Heterogeneous Service ：异构服务型。
- Compute-optimized with FPGA ：FPGA计算型。
- Compute-optimized with NPU ：NPU计算型。
- ECS Bare Metal ：弹性裸金属服务器。
- Super Computing Cluster：超级计算集群。', example='Compute-optimized'),
  instanceType?: string(name='InstanceType', description='实例规格。', example='ecs.g6.large'),
  instanceTypeFamily?: string(name='InstanceTypeFamily', description='实例规格所属的实例规格族。取值请参见DescribeInstanceTypeFamilies。', example='ecs.g6'),
  localStorageAmount?: int32(name='LocalStorageAmount', description='实例挂载的本地盘的数量。', example='8'),
  localStorageCapacity?: long(name='LocalStorageCapacity', description='实例挂载的本地盘的单盘容量。单位：GiB', example='40'),
  optimized?: boolean(name='Optimized', description='是否IO优化类型。', example='true'),
}

model KeyValue {
  key?: string(name='Key', description='键。', example='key'),
  value?: string(name='Value', description='值。', example='value'),
}

model ListApiTemplatesDTO {
  apiName?: string(name='ApiName'),
  content?: string(name='Content'),
  gmtCreate?: long(name='GmtCreate'),
  gmtModified?: long(name='GmtModified'),
  id?: long(name='Id'),
  operatorId?: string(name='OperatorId'),
  regionId?: string(name='RegionId'),
  resourceGroupId?: string(name='ResourceGroupId'),
  status?: string(name='Status'),
  templateId?: string(name='TemplateId'),
  templateName?: string(name='TemplateName'),
  userId?: string(name='UserId'),
}

model ManagedScalingConstraints {
  maxCapacity?: int32(name='MaxCapacity', description='最大值。', example='2000'),
  maxOnDemandCapacity?: int32(name='MaxOnDemandCapacity', description='最大按量节点数量', example='0'),
  minCapacity?: int32(name='MinCapacity', description='最小值。', example='0'),
}

model MetaStoreConf {
  dbPassword?: string(name='DbPassword'),
  dbUrl?: string(name='DbUrl'),
  dbUserName?: string(name='DbUserName'),
}

model MetricUnitValue {
  metricName?: string(name='MetricName', description='指标名称。'),
  metricUnit?: string(name='MetricUnit', description='指标单位。'),
}

model MetricsTrigger {
  conditionLogicOperator?: string(name='ConditionLogicOperator', description='多指标逻辑关系。默认：Or。取值范围：
- And:与
- Or：或', example='Or'),
  conditions?: [
    TriggerCondition
  ](name='Conditions', description='指标触发条件列表。'),
  coolDownInterval?: int32(name='CoolDownInterval', description='冷却时间。 单位为秒', example='300'),
  evaluationCount?: int32(name='EvaluationCount', description='统计次数。

This parameter is required.', example='2'),
  timeConstraints?: [
    TimeConstraint
  ](name='TimeConstraints', description='时间限制。'),
  timeWindow?: int32(name='TimeWindow', description='统计窗口。单位为秒。

This parameter is required.', example='30'),
}

model Node {
  autoRenew?: boolean(name='AutoRenew', description='节点是否自动续费。', example='false'),
  autoRenewDuration?: int32(name='AutoRenewDuration', description='节点自动续费时长。', example='1'),
  autoRenewDurationUnit?: string(name='AutoRenewDurationUnit', description='节点自动续费时长单位。', example='Month'),
  createTime?: long(name='CreateTime'),
  expireTime?: long(name='ExpireTime', description='节点过期时间。', example='1603728394857'),
  instanceType?: string(name='InstanceType', description='实例类型。', example='ecs.g6e.xlarge'),
  maintenanceStatus?: string(name='MaintenanceStatus', description='运维模式状态。取值范围：
- ON：处于运维模式。
- OFF：处于非运维模式。

为空表示处于非运维模式。'),
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。', example='ng-869471354ecd****'),
  nodeGroupType?: string(name='NodeGroupType', description='节点组类型。', example='CORE'),
  nodeId?: string(name='NodeId', description='节点ID。', example='i-bp1cudc25w2bfwl5****'),
  nodeName?: string(name='NodeName', description='节点名称。', example='core1-1'),
  nodeState?: string(name='NodeState', description='节点状态。取值范围：
- Pending：创建中。
- Starting：启动中。
- Running：运行中。
- Stopping：停止中。
- Stopped：已停止。
- Terminated：已终止。', example='Running'),
  privateIp?: string(name='PrivateIp', description='私网IP。', example='10.10.10.1'),
  publicIp?: string(name='PublicIp', description='公网IP。', example='42.120.75.***'),
  zoneId?: string(name='ZoneId', description='可用区ID。', example='cn-beijing-h'),
}

model NodeAttributes {
  dataDiskEncrypted?: boolean(name='DataDiskEncrypted', description='是否启用云盘加密。取值范围：
- true：启用加密。
- false：不加密。

默认值：false，不加密', example='false'),
  dataDiskKMSKeyId?: string(name='DataDiskKMSKeyId', description='KMS加密秘钥ID。', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
  keyPairName?: string(name='KeyPairName', description='ECS ssh登录秘钥。', example='emr_login'),
  masterRootPassword?: string(name='MasterRootPassword', description='MASTER节点root密码。', example='Adxefswfd****'),
  ramRole?: string(name='RamRole', description='ECS访问资源绑定的角色。', example='AliyunECSInstanceForEMRRole'),
  securityGroupId?: string(name='SecurityGroupId', description='安全组ID。EMR只支持普通安全组，不支持企业安全组。

This parameter is required.', example='sg-hp3abbae8lb6lmb1****'),
  systemDiskEncrypted?: boolean(name='SystemDiskEncrypted', description='是否启用云盘加密。取值范围：
- true：启用加密。
- false：不加密。

默认值：false，不加密', example='false'),
  systemDiskKMSKeyId?: string(name='SystemDiskKMSKeyId', description='KMS加密秘钥ID。', example='0e478b7a-4262-4802-b8cb-00d3fb40****'),
  vpcId?: string(name='VpcId', description='专有网络ID。

This parameter is required.', example='vpc-bp1tgey2p0ytxmdo5****'),
  zoneId?: string(name='ZoneId', description='可用区ID。

This parameter is required.', example='cn-beijing-h'),
}

model NodeCountConstraint {
  max?: int32(name='Max', example='100'),
  min?: int32(name='Min', example='1'),
  type?: string(name='Type', description='This parameter is required.', example='range'),
  values?: [ int32 ](name='Values'),
}

model NodeGroup {
  additionalSecurityGroupIds?: [ string ](name='AdditionalSecurityGroupIds', description='安全组ID。', example='["sg-hp3abbae8lb6lmb1****"]'),
  compensateWithOnDemand?: boolean(name='CompensateWithOnDemand', example='true'),
  costOptimizedConfig?: CostOptimizedConfig(name='CostOptimizedConfig', description='成本优化模式配置。'),
  dataDisks?: [
    DataDisk
  ](name='DataDisks', description='数据盘列表。'),
  deploymentSetStrategy?: string(name='DeploymentSetStrategy', description='部署集策略。取值范围：
- NONE：不适用部署集。
- CLUSTER：使用集群级别部署集。
- NODE_GROUP：使用节点组级别部署集。

默认值：NONE。', example='NONE'),
  gracefulShutdown?: boolean(name='GracefulShutdown', description='节点组上部署的组件是否开启优雅下线。取值范围：
- true：开启优雅下线。
- false：不开启优雅下线。', example='false'),
  instanceTypes?: [ string ](name='InstanceTypes', description='实例类型列表。', example='["ecs.g6.4xlarge"]'),
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。', example='ng-869471354ecd****'),
  nodeGroupName?: string(name='NodeGroupName', description='节点组名称。最大长度128个字符。', example='core-1'),
  nodeGroupState?: string(name='NodeGroupState', description='节点组状态。', example='CREATED'),
  nodeGroupType?: string(name='NodeGroupType', description='节点组类型。取值范围：
- MASTER：管理类型节点组。
- CORE：存储类型节点组。
- TASK：计算类型节点组。', example='CORE'),
  nodeResizeStrategy?: string(name='NodeResizeStrategy', description='- COST_OPTIMIZED：成本优化策略。
- PRIORITY：优先级策略。', example='PRIORITY'),
  paymentType?: string(name='PaymentType', description='节点组付费类型。取值范围：
- PayAsYouGo：后付费，按量付费。
- Subscription：预付费，包年包月。', example='PayAsYouGo'),
  privatePoolOptions?: PrivatePoolOptions(name='PrivatePoolOptions'),
  runningNodeCount?: int32(name='RunningNodeCount', description='存活节点数量。', example='3'),
  spotBidPrices?: [
    SpotBidPrice
  ](name='SpotBidPrices'),
  spotInstanceRemedy?: boolean(name='SpotInstanceRemedy', description='开启补齐抢占式实例后，当收到抢占式实例将被回收的系统消息时，伸缩组将尝试创建新的实例，替换掉将被回收的抢占式实例。取值范围：
- true：开启补齐抢占式实例。
- false：不开启补齐抢占式实例。

默认值：false。', example='true'),
  spotStrategy?: string(name='SpotStrategy', description='是否支持竞价实例。', example='NoSpot'),
  stateChangeReason?: NodeGroupStateChangeReason(name='StateChangeReason', description='状态变化原因。'),
  status?: string(name='Status', example='CREATED'),
  systemDisk?: SystemDisk(name='SystemDisk', description='系统盘信息。'),
  vSwitchIds?: [ string ](name='VSwitchIds', description='虚拟机交换机ID列表。', example='["vsw-hp35g7ya5ymw68mmg****"]'),
  withPublicIp?: boolean(name='WithPublicIp', description='是否开公网IP。取值范围：
- true：开公网。
- false：不开公网。', example='false'),
  zoneId?: string(name='ZoneId', description='可用区ID。', example='cn-beijing-h'),
}

model NodeGroupConfig {
  additionalSecurityGroupIds?: [ string ](name='AdditionalSecurityGroupIds', description='附加安全组。除集群设置的安全组外，为节点组单独设置的附加安全组。数组元数个数N的取值范围：0~2。', example='["sg-hp3abbae8lb6lmb1****"]'),
  autoScalingPolicy?: AutoScalingPolicy(name='AutoScalingPolicy'),
  compensateWithOnDemand?: boolean(name='CompensateWithOnDemand', example='true'),
  componentTags?: [ string ](name='ComponentTags'),
  costOptimizedConfig?: CostOptimizedConfig(name='CostOptimizedConfig', description='成本优化模式配置。'),
  dataDisks?: [
    DataDisk
  ](name='DataDisks', description='数据盘。当前数据盘只支持一种磁盘类型，即数组元数个数N的取值范围：1~1。'),
  deploymentSetStrategy?: string(name='DeploymentSetStrategy', description='部署集策略。取值范围：
- NONE：不适用部署集。
- CLUSTER：使用集群级别部署集。
- NODE_GROUP：使用节点组级别部署集。

默认值：NONE。', example='NONE'),
  gracefulShutdown?: boolean(name='GracefulShutdown', description='节点组上部署的组件是否开启优雅下线。取值范围：
- true：开启优雅下线。
- false：不开启优雅下线。

默认值：false。', example='false'),
  instanceTypes?: [ string ](name='InstanceTypes', description='节点实例类型列表。数组元数个数N的取值范围：1~100。', example='["ecs.g6.xlarge"]'),
  nodeCount?: int32(name='NodeCount', description='节点数量。取值范围：1~1000。', example='3'),
  nodeGroupName?: string(name='NodeGroupName', description='节点组名称。最大长度128个字符。集群内要求节点组名称唯一。', example='core-1'),
  nodeGroupType?: string(name='NodeGroupType', description='节点组类型。取值范围：
- MASTER：管理类型节点组。
- CORE：存储类型节点组。
- TASK：计算类型节点组。

This parameter is required.', example='CORE'),
  nodeResizeStrategy?: string(name='NodeResizeStrategy', description='节点扩容策略。取值范围：
- COST_OPTIMIZED：成本优化策略。
- PRIORITY：优先级策略。

默认值：PRIORITY。', example='PRIORITY'),
  paymentType?: string(name='PaymentType', description='节点组付费类型。不传入时默认和集群付费类型一致。取值范围：
- PayAsYouGo：后付费，按量付费。
- Subscription：预付费，包年包月。

默认值：PayAsYouGo。', example='PayAsYouGo'),
  privatePoolOptions?: PrivatePoolOptions(name='PrivatePoolOptions'),
  spotBidPrices?: [
    SpotBidPrice
  ](name='SpotBidPrices', description='抢占式Spot实例出价价格。参数SpotStrategy取值为SpotWithPriceLimit时生效。数组元数个数N的取值范围：0~100。'),
  spotInstanceRemedy?: boolean(name='SpotInstanceRemedy', description='开启后，当收到抢占式实例将被回收的系统消息时，伸缩组将尝试创建新的实例，替换掉将被回收的抢占式实例。取值范围：
- true：开启补齐抢占式实例。
- false：不开启补齐抢占式实例。

默认值：false。', example='true'),
  spotStrategy?: string(name='SpotStrategy', description='抢占式Spot实例策略。取值范围：
- NoSpot：正常按量付费实例。
- SpotWithPriceLimit：设置最高出价的抢占式实例。
- SpotAsPriceGo：系统自动出价，最高按量付费价格的抢占式实例。

默认值：NoSpot。', example='NoSpot'),
  subscriptionConfig?: SubscriptionConfig(name='SubscriptionConfig', description='节点组预付费配置。不传入时默认和集群预付费配置一致。'),
  systemDisk?: SystemDisk(name='SystemDisk', description='系统盘。'),
  vSwitchIds?: [ string ](name='VSwitchIds', description='虚拟机交换机ID列表。数组元数个数N的取值范围：1~20。', example='["vsw-hp35g7ya5ymw68mmg****"]'),
  withPublicIp?: boolean(name='WithPublicIp', description='是否开公网IP。取值范围：
- true：开公网。
- false：不开公网。

默认值：false。', example='false'),
}

model NodeGroupParam {
  autoPayOrder?: boolean(name='AutoPayOrder'),
  autoRenew?: boolean(name='AutoRenew'),
  autoRenewDuration?: int32(name='AutoRenewDuration'),
  autoRenewDurationUnit?: string(name='AutoRenewDurationUnit'),
  dataDisks?: [
    DiskInfo
  ](name='DataDisks'),
  description?: string(name='Description'),
  instanceTypes?: [ string ](name='InstanceTypes'),
  nodeCount?: int32(name='NodeCount'),
  nodeGroupIndex?: int32(name='NodeGroupIndex'),
  nodeGroupName?: string(name='NodeGroupName'),
  nodeGroupType?: string(name='NodeGroupType'),
  paymentDuration?: int32(name='PaymentDuration'),
  paymentDurationUnit?: string(name='PaymentDurationUnit'),
  paymentType?: string(name='PaymentType'),
  systemDisk?: SystemDiskParam(name='SystemDisk'),
  vSwitchIds?: [ string ](name='VSwitchIds'),
  zoneId?: string(name='ZoneId'),
}

model NodeGroupStateChangeReason {
  code?: string(name='Code', description='状态码。', example='MissingParameter'),
  message?: string(name='Message', description='描述信息。', example='The instance type is required.'),
}

model NodeSelector {
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。当NodeSelectType取值NodeGroup时，该参数生效。', example='ng-869471354ecd****', deprecated=true),
  nodeGroupIds?: [ string ](name='NodeGroupIds'),
  nodeGroupName?: string(name='NodeGroupName', description='节点组名称。当NodeSelectType取值NodeGroup，且参数NodeGroupId为空时生效，该参数生效。', example='master-1', deprecated=true),
  nodeGroupNames?: [ string ](name='NodeGroupNames'),
  nodeGroupTypes?: [ string ](name='NodeGroupTypes', description='节点组类型。当NodeSelectType取值NodeGroup，且参数NodeGroupId为空时生效。数组元数个数N取值范围：0~10。', example='["CORE","TASK"]'),
  nodeNames?: [ string ](name='NodeNames', description='节点名称列表。当NodeSelectType取值Node时，该参数生效。', example='["core1-1"]'),
  nodeSelectType?: string(name='NodeSelectType', description='节点选择类型。取值范围：
- CLUSTER：集群。
- NODE_GROUP：节点组。
- NODE：节点。

This parameter is required.', example='CLUSTER'),
}

model OSUser {
  group?: string(name='Group', description='用户组。', example='hadoop'),
  password?: string(name='Password', description='用户密码。', example='12345****'),
  user?: string(name='User', description='用户名称。', example='王五'),
}

model OnKubeClusterResource {
  cpu?: string(name='Cpu'),
  memory?: string(name='Memory'),
}

model Operation {
  clusterId?: string(name='ClusterId', description='集群ID。', example='c-b933c5aac8fe****'),
  createTime?: long(name='CreateTime', description='创建时间。', example='1628589439114'),
  description?: string(name='Description', description='描述。', example='start'),
  endTime?: long(name='EndTime', description='结束时间。', example='1628589439114'),
  operationId?: string(name='OperationId', description='操作ID。', example='op-13c37a77c505****'),
  operationState?: string(name='OperationState', description='操作状态。', example='COMPLETED'),
  operationType?: string(name='OperationType', description='操作类型。', example='CLUSTER'),
  startTime?: long(name='StartTime', description='开始时间。', example='1628589439114'),
  stateChangeReason?: OperationStateChangeReason(name='StateChangeReason', description='状态转换原因。'),
}

model OperationData {
  actualDeliveredAmounts?: int32(name='actualDeliveredAmounts'),
  toBeDeliveredAmounts?: int32(name='toBeDeliveredAmounts'),
}

model OperationStateChangeReason {
  code?: string(name='Code', description='状态码。', example='OutOfStock'),
  message?: string(name='Message', description='状态变化信息。', example='The requested resource is sold out in the specified zone, try other types of resources or other regions and zones.'),
}

model Order {
  createTime?: string(name='CreateTime'),
  orderId?: string(name='OrderId'),
}

model Page {
  items?: [ string ](name='Items'),
  maxResults?: long(name='MaxResults'),
  nextToken?: string(name='NextToken'),
  totalCount?: long(name='TotalCount'),
}

model Pod {
  message?: string(name='Message'),
  podName?: string(name='PodName'),
  podStatus?: string(name='PodStatus'),
  reason?: string(name='Reason'),
}

model PriceInfo {
  currency?: string(name='Currency'),
  discountPrice?: string(name='DiscountPrice'),
  originalPrice?: string(name='OriginalPrice'),
  payType?: string(name='PayType'),
  promotionResults?: [
    PromotionInfo
  ](name='PromotionResults'),
  resourceType?: string(name='ResourceType'),
  spotInstanceTypeOriginalPrice?: string(name='SpotInstanceTypeOriginalPrice'),
  spotInstanceTypePrice?: string(name='SpotInstanceTypePrice'),
  spotOriginalPrice?: string(name='SpotOriginalPrice'),
  spotPrice?: string(name='SpotPrice'),
  taxPrice?: string(name='TaxPrice'),
  tradePrice?: string(name='TradePrice'),
}

model PrivatePoolOptions {
  matchCriteria?: string(name='MatchCriteria', example='Open'),
  privatePoolIds?: [ string ](name='PrivatePoolIds', example='eap-bp67acfmxazb4****'),
}

model Promotion {
  productCode?: string(name='ProductCode', description='产品码。', example='ecs'),
  promotionDesc?: string(name='PromotionDesc', description='优惠券描述。', example='5元优惠券（有效期至23年8月11日）'),
  promotionName?: string(name='PromotionName', description='优惠券名称。', example='5元优惠券'),
  promotionOptionCode?: string(name='PromotionOptionCode', description='优惠券码。', example='youhui_quan'),
  promotionOptionNo?: string(name='PromotionOptionNo', description='优惠券号。

This parameter is required.', example='ABC123'),
}

model PromotionInfo {
  canPromFee?: string(name='CanPromFee'),
  isSelected?: string(name='IsSelected'),
  promotionDesc?: string(name='PromotionDesc'),
  promotionName?: string(name='PromotionName'),
  promotionOptionCode?: string(name='PromotionOptionCode'),
  promotionOptionNo?: string(name='PromotionOptionNo'),
}

model PromotionParam {
  productCode?: string(name='ProductCode'),
  promotionOptionCode?: string(name='PromotionOptionCode'),
  promotionOptionNo?: string(name='PromotionOptionNo'),
}

model RecommendScalingRule {
  activityType?: string(name='ActivityType', description='伸缩活动类型。取值范围：
- SCALE_OUT：扩容。
- SCALE_IN：缩容。

This parameter is required.', example='SCALE_IN'),
  adjustmentValue?: int32(name='AdjustmentValue', description='调整值。需要为正数，代表需要扩容或者缩容的实例数量。

This parameter is required.', example='100'),
  instanceType?: string(name='InstanceType', description='推荐的规格类型。'),
  maxSave?: float(name='MaxSave', description='最大节约成本。', example='0.12'),
  metricsTrigger?: MetricsTrigger(name='MetricsTrigger', description='按照负载伸缩描述。
<p>'),
  ruleName?: string(name='RuleName', description='规则名称。

This parameter is required.', example='scale-out-memory'),
  timeTrigger?: TimeTrigger(name='TimeTrigger', description='按照时间伸缩描述。
<p>'),
  triggerType?: string(name='TriggerType', description='伸缩规则类型。 取值范围：
- TIME_TRIGGER: 按时间伸缩。
- METRICS_TRIGGER: 按负载伸缩。

This parameter is required.', example='TIME_TRIGGER'),
}

model RenewInstance {
  emrRenewDuration?: int32(name='EmrRenewDuration', description='emr实例续费时长。', example='12'),
  emrRenewDurationUnit?: string(name='EmrRenewDurationUnit', description='emr实例续费时长单位。', example='Month'),
  instanceId?: string(name='InstanceId', description='节点ID。

This parameter is required.', example='i-bp1cudc25w2bfwl5****'),
  renewDuration?: int32(name='RenewDuration', description='续费时长。', example='12'),
  renewDurationUnit?: string(name='RenewDurationUnit', description='付费时长单位。', example='Month'),
}

model RenewInstanceParam {
  instanceId?: string(name='InstanceId'),
  renewDuration?: long(name='RenewDuration'),
  renewDurationUnit?: string(name='RenewDurationUnit'),
}

model ReplacementStrategy {
  instanceCategories?: [
    InstanceCategory
  ](name='InstanceCategories'),
}

model RequestTag {
  key?: string(name='Key'),
  value?: string(name='Value'),
}

model ResizeDiskNodeGroupParam {
  dataDiskCapacity?: long(name='DataDiskCapacity'),
  nodeGroupId?: string(name='NodeGroupId'),
  rollingRestart?: boolean(name='RollingRestart'),
}

model ScalingActivity {
  cause?: string(name='Cause'),
  description?: string(name='Description'),
  endTime?: long(name='EndTime'),
  essScalingRuleId?: string(name='EssScalingRuleId'),
  expectNum?: int32(name='ExpectNum'),
  hostGroupName?: string(name='HostGroupName'),
  id?: string(name='Id'),
  instanceIds?: string(name='InstanceIds'),
  scalingGroupId?: string(name='ScalingGroupId'),
  scalingRuleName?: string(name='ScalingRuleName'),
  startTime?: long(name='StartTime'),
  status?: string(name='Status'),
  totalCapacity?: int32(name='TotalCapacity'),
  transition?: string(name='Transition'),
}

model ScalingActivityResult {
  instanceId?: string(name='InstanceId', description='实例ID。', example='i-bp1cudc25w2bfwl5****'),
}

model ScalingActivityResultDTO {
  instanceId?: string(name='InstanceId', description='实例ID。', example='i-bp1cudc25w2bfwl5****'),
}

model ScalingAnalyzeResult {
  actualUsage?: float(name='ActualUsage', description='实际资源利用率。', example='0.12'),
  idealUsage?: float(name='IdealUsage', description='理想资源用量。', example='0.12'),
  releaseCores?: int32(name='ReleaseCores', description='固定资源释放核数（非master）core。', example='1'),
  reservedCores?: int32(name='ReservedCores', description='固定资源保留核数（非master）core。', example='1'),
}

model ScalingAnalyzeTimeRange {
  endTime?: long(name='EndTime', description='结束时间。', example='1676441972000'),
  startTime?: long(name='StartTime', description='起始时间。', example='1676441971000'),
  type?: string(name='Type', description='峰谷类型。 peak/valley', example='peak'),
}

model ScalingConstraints {
  maxCapacity?: int32(name='MaxCapacity', description='最大值。', example='2000'),
  minCapacity?: int32(name='MinCapacity', description='最小值。', example='0'),
}

model ScalingGroupConfig {
  dataDiskCategory?: string(name='DataDiskCategory', description='数据盘类型。', example='cloud_essd'),
  dataDiskCount?: int32(name='DataDiskCount', description='数据盘个数。', example='4'),
  dataDiskSize?: long(name='DataDiskSize', description='数据盘大小,单位GB。', example='40'),
  defaultCoolDownTime?: long(name='DefaultCoolDownTime', description='默认冷却时间。', example='0'),
  instanceTypeList?: [ 
    {
      instanceType?: string(name='InstanceType', description='Ecs类型。', example='ecs.c5.xlarge'),
      spotPriceLimit?: float(name='SpotPriceLimit', description='抢占价格上限,可空。', example='0.79'),
    }
  ](name='InstanceTypeList', description='抢占实例列表。'),
  multiAvailablePolicy?: {
    policyParam?: {
      onDemandBaseCapacity?: int32(name='OnDemandBaseCapacity', description='按需实例最小个数。', example='1'),
      onDemandPercentageAboveBaseCapacity?: int32(name='OnDemandPercentageAboveBaseCapacity', description='按需实例百分比。', example='10'),
      spotInstancePools?: int32(name='SpotInstancePools', description='抢占实例类型池规模。', example='10'),
      spotInstanceRemedy?: boolean(name='SpotInstanceRemedy', description='是否使用按量补偿。', example='false'),
    }(name='PolicyParam', description='资源可用性策略(成本优化参数)。'),
    policyType?: string(name='PolicyType', description='策略类型。', example='PRIORITY'),
  }(name='MultiAvailablePolicy', description='资源可用性策略(成本优化参数)。'),
  nodeOfflinePolicy?: {
    mode?: string(name='Mode', description='下线模式,是否为优雅下线。', example='DEFAULT'),
    timeoutMs?: long(name='TimeoutMs', description='下线超时时间,单位毫秒。', example='1000'),
  }(name='NodeOfflinePolicy', description='节点下线策略。'),
  privatePoolOptions?: {
    id?: string(name='Id', description='私有池id。', example='eap-bp67acfmxazb4****'),
    matchCriteria?: string(name='MatchCriteria', description='实例启动的私有池容量选项。。', example='Open'),
  }(name='PrivatePoolOptions', description='私有池选项	。'),
  scalingMaxSize?: int32(name='ScalingMaxSize', description='伸缩组节点最大个数。', example='10'),
  scalingMinSize?: int32(name='ScalingMinSize', description='伸缩组节点最小个数。', example='1'),
  spotStrategy?: string(name='SpotStrategy', description='抢占式Spot实例策略。', example='NoSpot'),
  sysDiskCategory?: string(name='SysDiskCategory', description='系统盘类型。', example='cloud_essd'),
  sysDiskSize?: long(name='SysDiskSize', description='系统盘大小,单位GB。', example='80'),
  triggerMode?: string(name='TriggerMode', description='伸缩活动触发模式。', example='ByLoad'),
}

model ScalingRule {
  activityType?: string(name='ActivityType', description='伸缩活动类型。取值范围：
- SCALE_OUT：扩容。
- SCALE_IN：缩容。

This parameter is required.', example='SCALE_IN'),
  adjustmentValue?: int32(name='AdjustmentValue', description='调整值。需要为正数，代表需要扩容或者缩容的实例数量。

This parameter is required.', example='100'),
  metricsTrigger?: MetricsTrigger(name='MetricsTrigger', description='按照负载伸缩描述。
<p>'),
  minAdjustmentValue?: int32(name='MinAdjustmentValue', example='1'),
  ruleName?: string(name='RuleName', description='规则名称。

This parameter is required.', example='scale-out-memory'),
  timeTrigger?: TimeTrigger(name='TimeTrigger', description='按照时间伸缩描述。
<p>'),
  triggerType?: string(name='TriggerType', description='伸缩规则类型。 取值范围：
- TIME_TRIGGER: 按时间伸缩。
- METRICS_TRIGGER: 按负载伸缩。

This parameter is required.', example='TIME_TRIGGER'),
}

model ScalingRuleSpec {
  adjustmentValue?: int32(name='AdjustmentValue', description='调整值。需要为正数，代表需要扩容或者缩容的实例数量。

This parameter is required.', example='100'),
  byLoadScalingRuleSpec?: {
    comparisonOperator?: string(name='ComparisonOperator', description='比较符。

This parameter is required.', example='LT'),
    evaluationCount?: int32(name='EvaluationCount', description='统计次数。

This parameter is required.', example='2'),
    metricName?: string(name='MetricName', description='指标名称。指标名称需要在 ListAutoScalingMetrics 接口返回的指标名称列表中。

This parameter is required.', example='yarn_resourcemanager_root_availablememoryusage'),
    statistics?: string(name='Statistics', description='统计量名称。

This parameter is required.', example='AVG'),
    threshold?: double(name='Threshold', description='阈值。

This parameter is required.', example='12.5'),
    timeWindow?: int32(name='TimeWindow', description='统计窗口。单位为秒。

This parameter is required.', example='30'),
  }(name='ByLoadScalingRuleSpec', description='按照负载伸缩描述。'),
  byTimeScalingRuleSpec?: {
    endTime?: long(name='EndTime', description='重复执行定时任务的结束时间戳。单位为毫秒。', example='1639714800000'),
    launchTime?: long(name='LaunchTime', description='启动时间戳。单位为毫秒。

This parameter is required.', example='1639714634819'),
    recurrenceType?: string(name='RecurrenceType', description='指定时间规则的执行类型。', example='WEEKLY'),
    recurrenceValue?: string(name='RecurrenceValue', description='重复执行定时任务的数值。具体取值取决于 recurrenceType 设置。', example='MON,FRI,SUN'),
  }(name='ByTimeScalingRuleSpec', description='按照时间伸缩描述。'),
  coolDownInterval?: int32(name='CoolDownInterval', description='冷却时间。单位为秒，取值范围在30~10800秒之间。

This parameter is required.', example='60'),
  scalingActivityType?: string(name='ScalingActivityType', description='伸缩活动类型。

This parameter is required.', example='SCALE_IN'),
  scalingRuleName?: string(name='ScalingRuleName', description='规则名称。

This parameter is required.', example='scale-out-memory'),
  scalingRuleType?: string(name='ScalingRuleType', description='伸缩规则类型。

This parameter is required.', example='BY_TIME'),
}

model ScalingRuleV1 {
  adjustmentType?: string(name='AdjustmentType', description='调整类型。', example='QUANTITY_CHANGE_IN_CAPACITY'),
  adjustmentValue?: int32(name='AdjustmentValue', description='调整值,正数为扩容,负数为缩容。', example='1'),
  coolDownTime?: int32(name='CoolDownTime', description='冷却时间,单位秒。', example='4'),
  ruleName?: string(name='RuleName', description='规则名称。', example='tule1'),
  ruleParam?: {
    comparisonOperator?: string(name='ComparisonOperator', description='[负载触发参数] 比较符。', example='>'),
    evaluationCount?: int32(name='EvaluationCount', description='[负载触发参数] 统计次数。', example='1'),
    launchExpirationTime?: int32(name='LaunchExpirationTime', description='[时间调度参数] 周期类型周期过期时间。', example='0'),
    launchTime?: string(name='LaunchTime', description='[时间调度参数] 周期类型周期开始时间。', example='2021-09-15T04:02Z'),
    metricName?: string(name='MetricName', description='[负载触发参数] 度量名称。', example='YarnRootAvailableVCores'),
    period?: int32(name='Period', description='[负载触发参数] 统计时长,单位分钟。', example='5'),
    recurrenceEndTime?: string(name='RecurrenceEndTime', description='[时间调度参数] 周期类型周期结束时间。', example='2021-09-16T05:02Z'),
    recurrenceType?: string(name='RecurrenceType', description='[时间调度参数] 周期类型。', example='Daily'),
    recurrenceValue?: string(name='RecurrenceValue', description='[时间调度参数] 周期类型周期值。', example='1'),
    statistics?: string(name='Statistics', description='[负载触发参数] 统计方式。', example='Average'),
    threshold?: int32(name='Threshold', description='[负载触发参数] 阈值。', example='1'),
  }(name='RuleParam', description='规则参数。'),
  ruleType?: string(name='RuleType', description='规则类型。', example='BY_LOAD'),
  scalingConfigBizId?: string(name='ScalingConfigBizId', description='弹性规则配置ID。', example='SCB-DCD96BCCFED1****'),
}

model Script {
  executionFailStrategy?: string(name='ExecutionFailStrategy', description='执行失败策略。', example='FAILED_CONTINUE'),
  executionMoment?: string(name='ExecutionMoment', description='脚本的执行时机。', example='BEFORE_INSTALL'),
  nodeSelector?: NodeSelector(name='NodeSelector', description='节点选择器。

This parameter is required.'),
  priority?: int32(name='Priority', description='脚本执行优先级。取值范围：1~100。', example='1', deprecated=true),
  scriptArgs?: string(name='ScriptArgs', description='脚本执行参数。', example='-host 10.0.10.5 -m 30'),
  scriptName?: string(name='ScriptName', description='脚本名称。长度为1~64个字符，必须以大小字母或中文开头，不能以http://和https://开头。可以包含中文、英文、数字、下划线（_）、或者短划线（-）

This parameter is required.', example='脚本名-1'),
  scriptPath?: string(name='ScriptPath', description='脚本所在OSS路径。

This parameter is required.', example='oss://bucket1/update_hosts.sh'),
}

model SpotBidPrice {
  bidPrice?: double(name='BidPrice', description='实例的每小时最高出价。支持最大3位小数，参数SpotStrategy=SpotWithPriceLimit时，该参数生效。', example='1000.0'),
  instanceType?: string(name='InstanceType', description='实例类型。', example='ecs.g7.2xlarge'),
}

model SpotPriceLimit {
  instanceType?: string(name='InstanceType'),
  priceLimit?: double(name='PriceLimit'),
}

model StateChangeReason {
  code?: string(name='Code', description='状态码。', example='MissingParameter'),
  message?: string(name='Message', description='描述信息。', example='The instance type is required.'),
}

model SubscriptionConfig {
  autoRenew?: boolean(name='AutoRenew', description='自动续费。取值范围：
- true：开启启动续费。
- false：不开启自动续费。
默认值：false。', example='true'),
  autoRenewDuration?: int32(name='AutoRenewDuration', description='自动续费时长。当AutoRenew取值为true时生效。当AutoRenewDurationUnit取值为Month时，取值：1、2、3、4、5、6、7、8、9、12、24、36、48、60。', example='12'),
  autoRenewDurationUnit?: string(name='AutoRenewDurationUnit', description='- Month：月。', example='Month'),
  paymentDuration?: int32(name='PaymentDuration', description='付费时长。PaymentDurationUnit取值为Month时，取值：1、2、3、4、5、6、7、8、9、12、24、36、48、60。

This parameter is required.', example='12'),
  paymentDurationUnit?: string(name='PaymentDurationUnit', description='付费时长单位。取值范围：
- Month：月。

This parameter is required.', example='Month'),
}

model SystemDisk {
  category?: string(name='Category', description='磁盘类型。

This parameter is required.', example='cloud_essd'),
  count?: int32(name='Count', description='每个节点系统盘数量，默认值为1。', example='1'),
  performanceLevel?: string(name='PerformanceLevel', description='创建ESSD云盘作为系统盘使用时，设置云盘的性能等级。取值范围：
- PL0：单盘最高随机读写IOPS 1万。
- PL1（默认）：单盘最高随机读写IOPS 5万。
- PL2：单盘最高随机读写IOPS 10万。
- PL3：单盘最高随机读写IOPS 100万。

默认值：PL1。', example='PL1'),
  size?: int32(name='Size', description='单位GB。

This parameter is required.', example='60'),
}

model SystemDiskParam {
  category?: string(name='Category'),
  performanceLevel?: string(name='PerformanceLevel'),
  size?: int32(name='Size'),
}

model Tag {
  key?: string(name='Key', description='标签键。必填参数，不允许为空字符串。最多支持128个字符，不能以aliyun和acs:开头，不能包含http://或https://。

This parameter is required.', example='department'),
  value?: string(name='Value', description='标签值。非必填，可以为空字符串。最多支持128个字符，不能以acs:开头，不能包含http://或者https://。', example='IT'),
}

model TagResource {
  resourceId?: string(name='ResourceId'),
  resourceType?: string(name='ResourceType'),
  tagKey?: string(name='TagKey'),
  tagValue?: string(name='TagValue'),
}

model TimeConstraint {
  endTime?: string(name='EndTime', description='结束时间。取值范围：00:00:00至23:59:59', example='23:59:59'),
  startTime?: string(name='StartTime', description='开始时间。取值范围：00:00:00至23:59:59', example='06:00:00'),
}

model TimeRange {
  endTime?: string(name='EndTime', description='结束时间。', example='1676441972000'),
  startTime?: string(name='StartTime', description='起始时间。', example='1676441971000'),
}

model TimeTrigger {
  endTime?: long(name='EndTime', description='结束时间戳。单位为毫秒。', example='1639714800000'),
  launchExpirationTime?: int32(name='LaunchExpirationTime', description='定时任务触发操作失败后，在此时间内重试。单位为秒，取值范围：0~3600。', example='600'),
  launchTime?: string(name='LaunchTime', description='启动时间。

This parameter is required.'),
  recurrenceType?: string(name='RecurrenceType', description='指定时间规则的执行类型。', example='WEEKLY'),
  recurrenceValue?: string(name='RecurrenceValue', description='重复执行定时任务的数值。具体取值取决于 recurrenceType 设置。
- recurrenceType 取 MINUTELY 时，只能填一个数值，取值范围：1~1440。
- recurrenceType 取 HOURLY 时，只能填一个数值，取值范围：1~24。
- recurrenceType 取 DAILY 时，只能填一个数值，取值范围：1~31。
- recurrenceType 取 WEEKLY 时，可以填入多个值，填多个值时使用英文逗号（,）分隔。周一到周天分别用MON，TUE，WED，THU，FRI，SAT，SUN代替。 比如 MON,FRI,SUN 代表周一、周五、周天。
- recurrenceType 取 MONTHLY 时，格式为A-B或者A,B。A、B的取值范围为1~31，如果使用A-B时B必须大于A。', example='MON,FRI,SUN'),
  startTime?: long(name='StartTime', description='开始时间戳。单位为毫秒。', example='1639714800000'),
}

model Toleration {
  effect?: string(name='Effect'),
  key?: string(name='Key'),
  operator?: string(name='Operator'),
  value?: string(name='Value'),
}

model TriggerCondition {
  comparisonOperator?: string(name='ComparisonOperator', description='比较符。取值范围：
- EQ:等于。
- NE:不等于。
- GT:大于。
- LT:小于。
- GE:大于等于。
- LE:小于等于。

This parameter is required.', example='LT'),
  metricName?: string(name='MetricName', description='指标名称。指标名称需要在 ListAutoScalingMetrics 接口返回的指标名称列表中。

This parameter is required.', example='yarn_resourcemanager_root_availablememoryusage'),
  statistics?: string(name='Statistics', description='统计量名称。取值范围：
- MAX：最大值。
- MIN：最小值。
- AVG：平均值。

This parameter is required.', example='AVG'),
  tags?: [
    Tag
  ](name='Tags', description='指标Tag。'),
  threshold?: double(name='Threshold', description='阈值。

This parameter is required.', example='12.5'),
}

model UpdateApplicationConfig {
  configDescription?: string(name='ConfigDescription', description='修改描述。', example='dfs.namenode.checkpoint.period'),
  configFileName?: string(name='ConfigFileName', description='应用配置文件名。', example='hdfs-site.xml'),
  configItemKey?: string(name='ConfigItemKey', description='配置项键。', example='dfs.namenode.checkpoint.period'),
  configItemValue?: string(name='ConfigItemValue', description='配置项值。', example='3600s'),
}

model UpdateSpecNodeGroup {
  newInstanceType?: string(name='NewInstanceType', description='新实例类型。

This parameter is required.', example='ecs.g7.xlarge'),
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。

This parameter is required.', example='ng-869471354ecd****'),
}

model UpdateSpecNodeGroupParam {
  newInstanceType?: string(name='NewInstanceType'),
  nodeGroupId?: string(name='NodeGroupId'),
}

model User {
  group?: string(name='Group', description='用户组。', example='hadoop'),
  password?: string(name='Password', description='用户密码。

This parameter is required.', example='12345****'),
  userId?: string(name='UserId', description='用户ID。

This parameter is required.', example='1238539****'),
  userName?: string(name='UserName', description='用户名称。

This parameter is required.', example='王五'),
  userType?: string(name='UserType', description='用户类型。', example='LDAP'),
}

model UserParam {
  password?: string(name='Password'),
  userId?: string(name='UserId'),
  userName?: string(name='UserName'),
}

model ValueConstraints {
  defaultValue?: int32(name='DefaultValue', description='默认值。'),
  end?: int32(name='End', description='结束值。'),
  start?: int32(name='Start', description='起始值。'),
  step?: int32(name='Step', description='步长。'),
  type?: string(name='Type', description='值限制类型。'),
  values?: [ int32 ](name='Values', description='枚举值。', example='null'),
}

model CreateApiTemplateRequest {
  apiName?: string(name='ApiName', description='The name of the API operation. You can create only a cluster API operation template. Set the value to CreateCluster.

This parameter is required.', example='CreateCluster'),
  content?: string(name='Content', description='The content of the cluster API operation template. Set the value to JSON strings of the request parameters of the [CreateCluster](https://help.aliyun.com/document_detail/454393.html) API operation for creating a cluster.

This parameter is required.', example='content'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='Resource group ID.', example='rg-acfmzabjyop****'),
  templateName?: string(name='TemplateName', description='Cluster template name.

This parameter is required.', example='DATALAKE模板'),
}

model CreateApiTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  success?: string(name='Success', description='Template ID (to be deprecated).', example='at-41b4c6a0fc63****'),
  templateId?: string(name='TemplateId', description='Template ID (it is recommended to use the parameter TemplateId).', example='at-41b4c6a0fc63****'),
}

model CreateApiTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateApiTemplateResponseBody(name='body'),
}

/**
 * @summary Creates a predefined API operation template. The template contains information about an API operation, including the basic structure, request method, URL path, request parameters, and response format.
 *
 * @param request CreateApiTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateApiTemplateResponse
 */
async function createApiTemplateWithOptions(request: CreateApiTemplateRequest, runtime: Util.RuntimeOptions): CreateApiTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.content)) {
    query['Content'] = request.content;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.templateName)) {
    query['TemplateName'] = request.templateName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateApiTemplate',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a predefined API operation template. The template contains information about an API operation, including the basic structure, request method, URL path, request parameters, and response format.
 *
 * @param request CreateApiTemplateRequest
 * @return CreateApiTemplateResponse
 */
async function createApiTemplate(request: CreateApiTemplateRequest): CreateApiTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return createApiTemplateWithOptions(request, runtime);
}

model CreateClusterRequest {
  applicationConfigs?: [
    ApplicationConfig
  ](name='ApplicationConfigs', description='The application configurations. Number of elements in the array: 1 to 1000.'),
  applications?: [
    Application
  ](name='Applications', description='The services. Number of elements in the array: 1 to 100.

This parameter is required.'),
  bootstrapScripts?: [
    Script
  ](name='BootstrapScripts', description='The bootstrap actions. Number of elements in the array: 1 to 10.'),
  clientToken?: string(name='ClientToken', description='The idempotent client token. If you call the same ClientToken multiple times, the returned results are the same. Only one cluster can be created with the same ClientToken.', example='A7D960FA-6DBA-5E07-8746-A63E3E4D****'),
  clusterName?: string(name='ClusterName', description='The name of the cluster. The name must be 1 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

This parameter is required.', example='emrtest'),
  clusterType?: string(name='ClusterType', description='The type of the cluster. Valid values:

*   DATALAKE: data lake
*   OLAP: online analytical processing (OLAP)
*   DATAFLOW: Dataflow
*   DATASERVING: DataServing
*   CUSTOM: a custom hybrid cluster.
*   HADOOP: the old data lake. We recommend that you use the new data lake.

If you create an EMR cluster for the first time after 17:00 (UTC +8) on December 19, 2022, you cannot select the HADOOP, DATA_SCIENCE, PRESTO, or ZOOKEEPER cluster type.

This parameter is required.', example='DATALAKE'),
  deletionProtection?: boolean(name='DeletionProtection', description='Specifies whether to enable release protection for the cluster. Valid values:

*   true: enables release protection for the cluster.
*   false: disables release protection for the cluster.

Default value: false.', example='false'),
  deployMode?: string(name='DeployMode', description='The deployment mode of master nodes in the cluster. Valid values:

*   NORMAL: regular mode. This is the default value. A cluster that contains only one master node is created.
*   HA: high availability (HA) mode. A cluster that contains three master nodes is created.', example='HA'),
  description?: string(name='Description', description='The cluster description.', example='Emr cluster for ETL'),
  nodeAttributes?: NodeAttributes(name='NodeAttributes', description='The attributes of all ECS instances.

This parameter is required.'),
  nodeGroups?: [
    NodeGroupConfig
  ](name='NodeGroups', description='The node groups. Number of elements in the array: 1 to 100.

This parameter is required.', example='NORMAL'),
  paymentType?: string(name='PaymentType', description='The billing cycle of the instance. Valid values:

*   PayAsYouGo: pay-as-you-go
*   Subscription: subscription

Default value: PayAsYouGo.', example='PayAsYouGo'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  releaseVersion?: string(name='ReleaseVersion', description='The EMR version. You can query available E-MapReduce (EMR) versions in the EMR console.

This parameter is required.', example='EMR-5.8.0'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which to assign the ENI.', example='rg-acfmzabjyop****'),
  securityMode?: string(name='SecurityMode', description='The security mode of the cluster. Valid values:

*   NORMAL: disables Kerberos authentication for the cluster. This is the default value.
*   KERBEROS: enables Kerberos authentication for the cluster.', example='NORMAL'),
  subscriptionConfig?: SubscriptionConfig(name='SubscriptionConfig', description='The subscription configurations. This parameter takes effect only if you set the PaymentType parameter to Subscription.'),
  tags?: [
    Tag
  ](name='Tags', description='The tags. Number of elements in the array: 0 to 20.', example='A7D960FA-6DBA-5E07-8746-A63E3E4D****'),
}

model CreateClusterResponseBody = {
  clusterId?: string(name='ClusterId', description='The ID of cluster.', example='c-b933c5aac7f7***'),
  operationId?: string(name='OperationId', description='The ID of the operation.', example='op-13c37a77c505****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model CreateClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateClusterResponseBody(name='body'),
}

/**
 * @summary Creates a pay-as-you-go or subscription cluster.
 *
 * @param request CreateClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateClusterResponse
 */
async function createClusterWithOptions(request: CreateClusterRequest, runtime: Util.RuntimeOptions): CreateClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationConfigs)) {
    query['ApplicationConfigs'] = request.applicationConfigs;
  }
  if (!Util.isUnset(request.applications)) {
    query['Applications'] = request.applications;
  }
  if (!Util.isUnset(request.bootstrapScripts)) {
    query['BootstrapScripts'] = request.bootstrapScripts;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.deletionProtection)) {
    query['DeletionProtection'] = request.deletionProtection;
  }
  if (!Util.isUnset(request.deployMode)) {
    query['DeployMode'] = request.deployMode;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.nodeAttributes)) {
    query['NodeAttributes'] = request.nodeAttributes;
  }
  if (!Util.isUnset(request.nodeGroups)) {
    query['NodeGroups'] = request.nodeGroups;
  }
  if (!Util.isUnset(request.paymentType)) {
    query['PaymentType'] = request.paymentType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.releaseVersion)) {
    query['ReleaseVersion'] = request.releaseVersion;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.securityMode)) {
    query['SecurityMode'] = request.securityMode;
  }
  if (!Util.isUnset(request.subscriptionConfig)) {
    query['SubscriptionConfig'] = request.subscriptionConfig;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateCluster',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a pay-as-you-go or subscription cluster.
 *
 * @param request CreateClusterRequest
 * @return CreateClusterResponse
 */
async function createCluster(request: CreateClusterRequest): CreateClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return createClusterWithOptions(request, runtime);
}

model CreateNodeGroupRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='C-E525E04F3914****'),
  nodeGroup?: NodeGroupConfig(name='NodeGroup', description='The information about the node group.

This parameter is required.'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model CreateNodeGroupResponseBody = {
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the machine group.', example='G-21E39B11837E****'),
  requestId?: string(name='RequestId', description='The request ID.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3****'),
}

model CreateNodeGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateNodeGroupResponseBody(name='body'),
}

/**
 * @summary Creates a node group.
 *
 * @description 创建节点组。
 *
 * @param request CreateNodeGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateNodeGroupResponse
 */
async function createNodeGroupWithOptions(request: CreateNodeGroupRequest, runtime: Util.RuntimeOptions): CreateNodeGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.nodeGroup)) {
    query['NodeGroup'] = request.nodeGroup;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateNodeGroup',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a node group.
 *
 * @description 创建节点组。
 *
 * @param request CreateNodeGroupRequest
 * @return CreateNodeGroupResponse
 */
async function createNodeGroup(request: CreateNodeGroupRequest): CreateNodeGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return createNodeGroupWithOptions(request, runtime);
}

model CreateScriptRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  scriptType?: string(name='ScriptType', description='The type of the script. Valid values:

*   BOOTSTRAP: indicates a bootstrap action of the Elastic Compute Service (ECS) instance.
*   NORMAL: indicates a common script.

This parameter is required.', example='BOOTSTRAP'),
  scripts?: [
    Script
  ](name='Scripts', description='The common scripts or bootstrap actions.

This parameter is required.'),
  timeoutSecs?: string(name='TimeoutSecs', description='The timeout period for manually running a common script. You cannot specify the timeout period for a bootstrap action.'),
}

model CreateScriptResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  scriptId?: string(name='ScriptId', description='The script ID.', example='cs-d6d6bc841c0d415fb81808bc6d09****'),
}

model CreateScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateScriptResponseBody(name='body'),
}

/**
 * @summary Adds a bootstrap action or a common script of an E-MapReduce (EMR) cluster.
 *
 * @param request CreateScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateScriptResponse
 */
async function createScriptWithOptions(request: CreateScriptRequest, runtime: Util.RuntimeOptions): CreateScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scriptType)) {
    query['ScriptType'] = request.scriptType;
  }
  if (!Util.isUnset(request.scripts)) {
    query['Scripts'] = request.scripts;
  }
  if (!Util.isUnset(request.timeoutSecs)) {
    query['TimeoutSecs'] = request.timeoutSecs;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateScript',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Adds a bootstrap action or a common script of an E-MapReduce (EMR) cluster.
 *
 * @param request CreateScriptRequest
 * @return CreateScriptResponse
 */
async function createScript(request: CreateScriptRequest): CreateScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return createScriptWithOptions(request, runtime);
}

model CreateUsersRequest {
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='区域ID。

This parameter is required.', example='cn-hangzhou'),
  users?: [ 
    {
      password?: string(name='Password', description='用户密码。

This parameter is required.', example='*Ab123'),
      userName?: string(name='UserName', description='用户名。

This parameter is required.', example='xi'),
    }
  ](name='Users', description='用户列表。

This parameter is required.'),
}

model CreateUsersResponseBody = {
  data?: boolean(name='Data', example='true'),
  requestId?: string(name='RequestId', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model CreateUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateUsersResponseBody(name='body'),
}

/**
 * @summary 创建用户
 *
 * @param request CreateUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateUsersResponse
 */
async function createUsersWithOptions(request: CreateUsersRequest, runtime: Util.RuntimeOptions): CreateUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.users)) {
    query['Users'] = request.users;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreateUsers',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建用户
 *
 * @param request CreateUsersRequest
 * @return CreateUsersResponse
 */
async function createUsers(request: CreateUsersRequest): CreateUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return createUsersWithOptions(request, runtime);
}

model DecreaseNodesRequest {
  batchInterval?: int32(name='BatchInterval', description='The cooldown interval between two batches.'),
  batchSize?: int32(name='BatchSize', description='The number of nodes to be removed in a single batch.'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  decreaseNodeCount?: int32(name='DecreaseNodeCount', description='The number of nodes to scale in. The number of nodes to be scaled in. The value should be less than the number of surviving nodes in the current node group.', example='3'),
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.

This parameter is required.', example='ng-869471354ecd****'),
  nodeIds?: [ string ](name='NodeIds', description='The array of node IDs. Valid values of array element N: 1 to 500.', example='["i-bp1cudc25w2bfwl5****"]'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
}

model DecreaseNodesResponseBody = {
  operationId?: string(name='OperationId', description='Operation ID.', example='op-13c37a77c505****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='44430037-E59A-3E66-A2B0-97D155346F22'),
}

model DecreaseNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DecreaseNodesResponseBody(name='body'),
}

/**
 * @summary Perform a scale-out operation on the target node group.
 *
 * @param request DecreaseNodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DecreaseNodesResponse
 */
async function decreaseNodesWithOptions(request: DecreaseNodesRequest, runtime: Util.RuntimeOptions): DecreaseNodesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.batchInterval)) {
    query['BatchInterval'] = request.batchInterval;
  }
  if (!Util.isUnset(request.batchSize)) {
    query['BatchSize'] = request.batchSize;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.decreaseNodeCount)) {
    query['DecreaseNodeCount'] = request.decreaseNodeCount;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.nodeIds)) {
    query['NodeIds'] = request.nodeIds;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DecreaseNodes',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Perform a scale-out operation on the target node group.
 *
 * @param request DecreaseNodesRequest
 * @return DecreaseNodesResponse
 */
async function decreaseNodes(request: DecreaseNodesRequest): DecreaseNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  return decreaseNodesWithOptions(request, runtime);
}

model DeleteApiTemplateRequest {
  apiName?: string(name='ApiName', description='Interface name.

This parameter is required.', example='CreateCluster'),
  regionId?: string(name='RegionId', description='Region ID

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='Resource group ID.', example='rg-acfmzabjyop****'),
  templateId?: string(name='TemplateId', description='Cluster template ID.

This parameter is required.', example='at-****'),
}

model DeleteApiTemplateResponseBody = {
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  success?: boolean(name='Success', description='Whether the call was successful: - true: Call succeeded - false: Call failed.', example='true', deprecated=true),
}

model DeleteApiTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteApiTemplateResponseBody(name='body'),
}

/**
 * @summary Deletes an API operation template.
 *
 * @description 创建集群模板
 *
 * @param request DeleteApiTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteApiTemplateResponse
 */
async function deleteApiTemplateWithOptions(request: DeleteApiTemplateRequest, runtime: Util.RuntimeOptions): DeleteApiTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteApiTemplate',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes an API operation template.
 *
 * @description 创建集群模板
 *
 * @param request DeleteApiTemplateRequest
 * @return DeleteApiTemplateResponse
 */
async function deleteApiTemplate(request: DeleteApiTemplateRequest): DeleteApiTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteApiTemplateWithOptions(request, runtime);
}

model DeleteClusterRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
}

model DeleteClusterResponseBody = {
  operationId?: string(name='OperationId', description='The ID of the operation.', example='op-13c37a77c505****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model DeleteClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteClusterResponseBody(name='body'),
}

/**
 * @param request DeleteClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteClusterResponse
 */
async function deleteClusterWithOptions(request: DeleteClusterRequest, runtime: Util.RuntimeOptions): DeleteClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCluster',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteClusterRequest
 * @return DeleteClusterResponse
 */
async function deleteCluster(request: DeleteClusterRequest): DeleteClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteClusterWithOptions(request, runtime);
}

model DeleteScriptRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  scriptId?: string(name='ScriptId', description='The script ID.

This parameter is required.', example='cs-da7476a7679a4d4c9cede62ebe09****'),
  scriptType?: string(name='ScriptType', description='The type of the script. Valid values:

*   BOOTSTRAP: indicates a bootstrap action of the Elastic Compute Service (ECS) instance.
*   NORMAL: indicates a common script.

This parameter is required.', example='BOOTSTRAP'),
}

model DeleteScriptResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model DeleteScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteScriptResponseBody(name='body'),
}

/**
 * @summary Deletes a bootstrap action or a common script of an E-MapReduce (EMR) cluster.
 *
 * @param request DeleteScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteScriptResponse
 */
async function deleteScriptWithOptions(request: DeleteScriptRequest, runtime: Util.RuntimeOptions): DeleteScriptResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.scriptType)) {
    query['ScriptType'] = request.scriptType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteScript',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes a bootstrap action or a common script of an E-MapReduce (EMR) cluster.
 *
 * @param request DeleteScriptRequest
 * @return DeleteScriptResponse
 */
async function deleteScript(request: DeleteScriptRequest): DeleteScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteScriptWithOptions(request, runtime);
}

model DeleteUsersRequest {
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
  userNames?: [ string ](name='UserNames'),
}

model DeleteUsersShrinkRequest {
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='This parameter is required.', example='cn-hangzhou'),
  userNamesShrink?: string(name='UserNames'),
}

model DeleteUsersResponseBody = {
  data?: boolean(name='Data', example='true'),
  requestId?: string(name='RequestId', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model DeleteUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteUsersResponseBody(name='body'),
}

/**
 * @param tmpReq DeleteUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteUsersResponse
 */
async function deleteUsersWithOptions(tmpReq: DeleteUsersRequest, runtime: Util.RuntimeOptions): DeleteUsersResponse {
  Util.validateModel(tmpReq);
  var request = new DeleteUsersShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.userNames)) {
    request.userNamesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.userNames, 'UserNames', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.clusterId)) {
    body['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.userNamesShrink)) {
    body['UserNames'] = request.userNamesShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteUsers',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteUsersRequest
 * @return DeleteUsersResponse
 */
async function deleteUsers(request: DeleteUsersRequest): DeleteUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteUsersWithOptions(request, runtime);
}

model GetApiTemplateRequest {
  regionId?: string(name='RegionId', description='Region ID.

This parameter is required.', example='cn-hangzhou'),
  templateId?: string(name='TemplateId', description='Cluster template ID.

This parameter is required.', example='at-41b4c6a0fc63****'),
}

model GetApiTemplateResponseBody = {
  data?: ApiTemplate(name='Data', description='The content of the API operation template.', deprecated=true),
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetApiTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetApiTemplateResponseBody(name='body'),
}

/**
 * @summary Queries the detailed configuration information about an API operation template.
 *
 * @param request GetApiTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetApiTemplateResponse
 */
async function getApiTemplateWithOptions(request: GetApiTemplateRequest, runtime: Util.RuntimeOptions): GetApiTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApiTemplate',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the detailed configuration information about an API operation template.
 *
 * @param request GetApiTemplateRequest
 * @return GetApiTemplateResponse
 */
async function getApiTemplate(request: GetApiTemplateRequest): GetApiTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApiTemplateWithOptions(request, runtime);
}

model GetApplicationRequest {
  applicationName?: string(name='ApplicationName', description='应用名称。

This parameter is required.', example='HDFS'),
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='地域ID。

This parameter is required.', example='cn-hangzhou'),
}

model GetApplicationResponseBody = {
  application?: {
    actions?: [ 
      {
        actionName?: string(name='ActionName', description='操作名称。', example='START'),
        actionParams?: [ 
          {
            description?: string(name='Description', description='动作参数描述。', example='start'),
            key?: string(name='Key', description='动作参数KEY。'),
            valueAttribute?: {
              description?: string(name='Description', description='值表述。', example='描述'),
              valueIncrementStep?: string(name='ValueIncrementStep', description='值步长。', example='2'),
              valueMaximum?: string(name='ValueMaximum', description='最大值。', example='20'),
              valueMinimum?: string(name='ValueMinimum', description='最小值。', example='1'),
              valueType?: string(name='ValueType', description='属性值类型。', example='STRING'),
              valueUnit?: string(name='ValueUnit', description='值单位。', example='number'),
            }(name='ValueAttribute', description='动作参数属性。'),
          }
        ](name='ActionParams', description='操作参数。'),
        command?: string(name='Command', description='命令。', example='START'),
        componentName?: string(name='ComponentName', description='组件名称。', example='DataNode'),
        description?: string(name='Description', description='操作描述。', example='描述'),
        runActionScope?: string(name='RunActionScope', description='执行范围。', example='CLUSTER'),
      }
    ](name='Actions', description='操作列表。'),
    applicationName?: string(name='ApplicationName', description='应用名称。', example='HDFS'),
    applicationState?: string(name='ApplicationState', description='应用操作状态。'),
    applicationVersion?: string(name='ApplicationVersion', description='应用版本。', example='2.8.5'),
    communityVersion?: string(name='CommunityVersion', description='社区版本。', example='2.8.5'),
  }(name='Application'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetApplicationResponseBody(name='body'),
}

/**
 * @description 查询应用详情。
 *
 * @param request GetApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetApplicationResponse
 */
async function getApplicationWithOptions(request: GetApplicationRequest, runtime: Util.RuntimeOptions): GetApplicationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationName)) {
    query['ApplicationName'] = request.applicationName;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetApplication',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @description 查询应用详情。
 *
 * @param request GetApplicationRequest
 * @return GetApplicationResponse
 */
async function getApplication(request: GetApplicationRequest): GetApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  return getApplicationWithOptions(request, runtime);
}

model GetAutoScalingActivityRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  scalingActivityId?: string(name='ScalingActivityId', description='The ID of the scaling activity.

This parameter is required.', example='asa-36373b084d6b4b13aa50f4129a9e****'),
}

model GetAutoScalingActivityResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  scalingActivity?: {
    activityId?: string(name='ActivityId', description='The ID of the scaling activity.', example='asa-36373b084d6b4b13aa50f4129a9e****'),
    activityResults?: [
      ScalingActivityResult
    ](name='ActivityResults', description='The instances that correspond to the scaling activity.'),
    activityState?: string(name='ActivityState', description='The status of the scaling activity. Valid values:

*   REJECTED
*   SUCCESSFUL
*   FAILED
*   IN_PROGRESS', example='IN_PROGRESS'),
    activityType?: string(name='ActivityType', description='The type of the scaling activity. Valid value:

*   SCALE_OUT
*   SCALE_IN', example='SCALE_OUT'),
    clusterId?: string(name='ClusterId', description='The cluster ID.', example='c-b933c5aac8fe****'),
    description?: string(name='Description', description='The description of the scaling activity.', example='clusterId not exist'),
    endTime?: long(name='EndTime', description='The time when scaling ended.', example='1639715634819'),
    expectNum?: int32(name='ExpectNum', description='The number of added or removed instances.', example='10'),
    nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.', example='ng-869471354ecd****'),
    nodeGroupName?: string(name='NodeGroupName', description='The name of the node group.', example='task-01'),
    operationId?: string(name='OperationId', description='The operation ID.', example='op-13c37a77c505****'),
    policyType?: string(name='PolicyType'),
    ruleDetail?: ScalingRule(name='RuleDetail', description='The description of the scaling rule.'),
    ruleName?: string(name='RuleName', description='The name of the scaling rule.', example='scaling-out-memory'),
    startTime?: long(name='StartTime', description='The time when scaling started.', example='1639714634819'),
  }(name='ScalingActivity', description='The information about the scaling activity.'),
}

model GetAutoScalingActivityResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAutoScalingActivityResponseBody(name='body'),
}

/**
 * @summary 获取弹性伸缩活动详情。
 *
 * @param request GetAutoScalingActivityRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAutoScalingActivityResponse
 */
async function getAutoScalingActivityWithOptions(request: GetAutoScalingActivityRequest, runtime: Util.RuntimeOptions): GetAutoScalingActivityResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scalingActivityId)) {
    query['ScalingActivityId'] = request.scalingActivityId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAutoScalingActivity',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取弹性伸缩活动详情。
 *
 * @param request GetAutoScalingActivityRequest
 * @return GetAutoScalingActivityResponse
 */
async function getAutoScalingActivity(request: GetAutoScalingActivityRequest): GetAutoScalingActivityResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAutoScalingActivityWithOptions(request, runtime);
}

model GetAutoScalingPolicyRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.

This parameter is required.', example='ng-869471354ecd****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetAutoScalingPolicyResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  scalingPolicy?: {
    clusterId?: string(name='ClusterId', description='The cluster ID.', example='c-b933c5aac8fe****'),
    constraints?: {
      maxCapacity?: int32(name='MaxCapacity', description='The maximum number of nodes in the node group. Default value: 2000.', example='2000'),
      minCapacity?: int32(name='MinCapacity', description='The minimum number of nodes in the node group. Default value: 0.', example='0'),
    }(name='Constraints', description='The maximum and minimum number of nodes in the node group.'),
    nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.', example='ng-869471354ecd****'),
    scalingPolicyId?: string(name='ScalingPolicyId', description='The ID of the scaling policy.', example='asp-asduwe23znl***'),
    scalingRules?: [ 
      {
        activityType?: string(name='ActivityType', description='The scaling type. Valid values:

*   SCALE_OUT
*   SCALE_IN', example='SCALE_OUT'),
        adjustmentType?: string(name='AdjustmentType', description='The adjustment type.', example='CHANGE_IN_CAPACITY'),
        adjustmentValue?: int32(name='AdjustmentValue', description='The adjustment value. The parameter value must be a positive integer, which indicates the number of instances that you want to add or remove.', example='100'),
        metricsTrigger?: MetricsTrigger(name='MetricsTrigger', description='The description of load-based scaling.'),
        ruleName?: string(name='RuleName', description='The name of the auto scaling rule.', example='scaling-out-memory'),
        timeTrigger?: TimeTrigger(name='TimeTrigger', description='The description of time-based scaling.'),
        triggerType?: string(name='TriggerType', description='The type of the auto scaling rule. Valid values:

*   TIME_TRIGGER: time-based scaling
*   METRICS_TRIGGER: load-based scaling', example='TIME_TRIGGER'),
      }
    ](name='ScalingRules', description='The auto scaling rules.'),
  }(name='ScalingPolicy', description='The information about the auto scaling policy.'),
}

model GetAutoScalingPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAutoScalingPolicyResponseBody(name='body'),
}

/**
 * @summary null
 *
 * @param request GetAutoScalingPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAutoScalingPolicyResponse
 */
async function getAutoScalingPolicyWithOptions(request: GetAutoScalingPolicyRequest, runtime: Util.RuntimeOptions): GetAutoScalingPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAutoScalingPolicy',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary null
 *
 * @param request GetAutoScalingPolicyRequest
 * @return GetAutoScalingPolicyResponse
 */
async function getAutoScalingPolicy(request: GetAutoScalingPolicyRequest): GetAutoScalingPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAutoScalingPolicyWithOptions(request, runtime);
}

model GetClusterRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetClusterResponseBody = {
  cluster?: Cluster(name='Cluster', description='The details of the cluster.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterResponseBody(name='body'),
}

/**
 * @summary Obtains the details of a cluster.
 *
 * @param request GetClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterResponse
 */
async function getClusterWithOptions(request: GetClusterRequest, runtime: Util.RuntimeOptions): GetClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetCluster',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the details of a cluster.
 *
 * @param request GetClusterRequest
 * @return GetClusterResponse
 */
async function getCluster(request: GetClusterRequest): GetClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return getClusterWithOptions(request, runtime);
}

model GetClusterCloneMetaRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetClusterCloneMetaResponseBody = {
  clusterCloneMeta?: {
    applicationConfigs?: [
      ApplicationConfig
    ](name='ApplicationConfigs', description='The modified configuration items.'),
    applications?: [
      Application
    ](name='Applications', description='The services.'),
    bootstrapScripts?: [
      Script
    ](name='BootstrapScripts', description='The bootstrap actions. Number of elements in the array: 1 to 10.'),
    clusterId?: string(name='ClusterId', description='The cluster ID.', example='c-b933c5aac7f7****'),
    clusterName?: string(name='ClusterName', description='The name of the cluster.', example='emrtest'),
    clusterState?: string(name='ClusterState', description='The status of the cluster. Valid values:

*   STARTING
*   START_FAILED
*   BOOTSTRAPPING
*   RUNNING
*   TERMINATING
*   TERMINATED
*   TERMINATED_WITH_ERRORS
*   TERMINATE_FAILED', example='RUNNING'),
    clusterType?: string(name='ClusterType', description='The cluster type. Valid values:

*   DATALAKE
*   OLAP
*   DATAFLOW
*   DATASERVING
*   CUSTOM
*   HADOOP', example='DATALAKE'),
    deletionProtection?: boolean(name='DeletionProtection', description='Indicates whether release protection is enabled for the cluster. Valid values:

*   true: Release protection is enabled for the cluster.
*   false: Release protection is disabled for the cluster.

Default value: false.', example='false'),
    deployMode?: string(name='DeployMode', description='The deployment mode of master nodes in the cluster. Valid values:

*   NORMAL: regular mode.
*   HA: high availability mode.', example='HA'),
    emrDefaultRole?: string(name='EmrDefaultRole', description='The EMR service role.', example='AliyunEMRDefaultRole'),
    existCloneConfig?: boolean(name='ExistCloneConfig', description='Indicates whether the service configurations of a Hadoop cluster that you made during cluster creation can be cloned. Valid values:

*   False
*   True'),
    nodeAttributes?: NodeAttributes(name='NodeAttributes', description='The node attributes.'),
    nodeGroups?: [
      NodeGroup
    ](name='NodeGroups', description='The node groups. Number of elements in the array: 1 to 100.'),
    paymentType?: string(name='PaymentType', description='The billing method of the cluster. Valid values:

*   PayAsYouGo
*   Subscription', example='PayAsYouGo'),
    regionId?: string(name='RegionId', description='The region ID.', example='cn-hangzhou'),
    releaseVersion?: string(name='ReleaseVersion', description='The EMR version.', example='EMR-5.6.0'),
    resourceGroupId?: string(name='ResourceGroupId', description='The resource group ID.', example='rg-acfmzabjyop****'),
    scalingPolicies?: [ 
      {
        clusterId?: string(name='ClusterId', description='The cluster ID.', example='c-b933c5aac8fe****'),
        constraints?: {
          maxCapacity?: int32(name='MaxCapacity', description='The maximum number of nodes in the node group. Default value: 2000.', example='200'),
          maxOnDemandCapacity?: int32(name='MaxOnDemandCapacity', description='The maximum number of pay-as-you-go nodes in the node group.', example='200'),
          minCapacity?: int32(name='MinCapacity', description='The minimum number of nodes in the node group. Default value: 0.', example='50'),
        }(name='Constraints', description='The maximum and minimum number of nodes in the node group.'),
        nodeGroupId?: string(name='NodeGroupId', description='The node group ID.', example='ng-869471354ecd****'),
        nodeGroupName?: string(name='NodeGroupName', description='The name of the node group.', example='emr-etltask'),
        scalingPolicyId?: string(name='ScalingPolicyId', description='The ID of the auto scaling policy.', example='asp-asduwe23znl***'),
        scalingPolicyType?: string(name='ScalingPolicyType', description='The type of the auto scaling policy.'),
        scalingRules?: [ 
          {
            activityType?: string(name='ActivityType', description='The scaling type. This parameter is required. Valid values:

*   SCALE_OUT
*   SCALE_IN', example='SCALE_OUT'),
            adjustmentValue?: int32(name='AdjustmentValue', description='The adjustment value of the auto scaling rule. This parameter is required. The parameter value must be a positive integer, which indicates the number of instances to be added or removed.', example='100'),
            metricsTrigger?: MetricsTrigger(name='MetricsTrigger', description='The description of load-based scaling.'),
            ruleName?: string(name='RuleName', description='The name of the auto scaling rule.', example='scaling-out-memory'),
            timeTrigger?: TimeTrigger(name='TimeTrigger', description='The description of time-based scaling.'),
            triggerType?: string(name='TriggerType', description='The trigger mode of the auto scaling rule. This parameter is required. Valid values:

*   TIME_TRIGGER: time-based scaling.
*   METRICS_TRIGGER: load-based scaling.', example='TIME_TRIGGER'),
          }
        ](name='ScalingRules', description='The auto scaling rules.'),
      }
    ](name='ScalingPolicies', description='The auto scaling policies of each node group in the cluster.'),
    securityMode?: string(name='SecurityMode', description='The security mode of the cluster. Valid values:

*   NORMAL: regular mode. Kerberos is not enabled.
*   KERBEROS: Kerberos mode. Kerberos is enabled.', example='NORMAL'),
    subscriptionConfig?: SubscriptionConfig(name='SubscriptionConfig', description='The subscription configurations.'),
    tags?: [
      Tag
    ](name='Tags', description='The tags.'),
  }(name='ClusterCloneMeta', description='The metadata of the cluster that you want to clone.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetClusterCloneMetaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetClusterCloneMetaResponseBody(name='body'),
}

/**
 * @summary Obtains metadata of the E-MapReduce (EMR) cluster that you want to clone. This helps you call the CreateCluster API operation to quickly create an EMR cluster.
 *
 * @param request GetClusterCloneMetaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetClusterCloneMetaResponse
 */
async function getClusterCloneMetaWithOptions(request: GetClusterCloneMetaRequest, runtime: Util.RuntimeOptions): GetClusterCloneMetaResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetClusterCloneMeta',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains metadata of the E-MapReduce (EMR) cluster that you want to clone. This helps you call the CreateCluster API operation to quickly create an EMR cluster.
 *
 * @param request GetClusterCloneMetaRequest
 * @return GetClusterCloneMetaResponse
 */
async function getClusterCloneMeta(request: GetClusterCloneMetaRequest): GetClusterCloneMetaResponse {
  var runtime = new Util.RuntimeOptions{};
  return getClusterCloneMetaWithOptions(request, runtime);
}

model GetDoctorApplicationRequest {
  appId?: string(name='AppId', description='The ID of the job that is submitted to YARN.

This parameter is required.', example='application_1542620905989_****'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorApplicationResponseBody = {
  data?: {
    analysis?: {
      score?: int32(name='Score', description='The score of the job.', example='67'),
      suggestion?: string(name='Suggestion', description='The suggestion for running the job.'),
    }(name='Analysis', description='The job analysis result.'),
    appName?: string(name='AppName', description='The name of the job.', example='CREATE TABLE test...ranks=1 (Stage-1)'),
    endTime?: long(name='EndTime', description='The end time of the job. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1666213200000'),
    ids?: [ string ](name='Ids', description='The job IDs. Multiple job IDs are separated with commas (,).', example='null'),
    metrics?: {
      memSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total memory usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='memSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='12312312'),
      }(name='MemSeconds', description='The aggregated amount of memory that is allocated to the job multiplied by the number of seconds the job has been running.'),
      memUtilization?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of used memory to total available memory'),
        name?: string(name='Name', description='The name of the metric.', example='memUtilization'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: float(name='Value', description='The value of the metric.', example='0.82'),
      }(name='MemUtilization', description='The memory usage.'),
      vcoreSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total vcore usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='vcoreSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='VCores * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='11123'),
      }(name='VcoreSeconds', description='The aggregated number of vCPUs that are allocated to the job multiplied by the number of seconds the job has been running.'),
      vcoreUtilization?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of used vcore to total available cores'),
        name?: string(name='Name', description='The name of the metric.', example='vcoreUtilization'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: float(name='Value', description='The value of the metric.', example='32.1'),
      }(name='VcoreUtilization', description='The CPU utilization. The meaning is the same as that of the %CPU command in the output of the Linux top command.'),
    }(name='Metrics', description='The metric information.'),
    querySql?: string(name='QuerySql', description='The SQL statement of the job. This parameter is left empty for non-SQL jobs.', example='SELECT id, count(1) FROM test group by id;'),
    queue?: string(name='Queue', description='The YARN queue to which the job was submitted.', example='DW'),
    startTime?: long(name='StartTime', description='The time when the job was submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1677465658275'),
    type?: string(name='Type', description='The type of the compute engine.', example='SPARK'),
    user?: string(name='User', description='The username that is used to submit the job.', example='DW'),
  }(name='Data', description='The details of the job.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorApplicationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorApplicationResponseBody(name='body'),
}

/**
 * @summary Obtains job analysis information on E-MapReduce (EMR) Doctor.
 *
 * @description get one doctor analysis app
 *
 * @param request GetDoctorApplicationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorApplicationResponse
 */
async function getDoctorApplicationWithOptions(request: GetDoctorApplicationRequest, runtime: Util.RuntimeOptions): GetDoctorApplicationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorApplication',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains job analysis information on E-MapReduce (EMR) Doctor.
 *
 * @description get one doctor analysis app
 *
 * @param request GetDoctorApplicationRequest
 * @return GetDoctorApplicationResponse
 */
async function getDoctorApplication(request: GetDoctorApplicationRequest): GetDoctorApplicationResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorApplicationWithOptions(request, runtime);
}

model GetDoctorComputeSummaryRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  componentInfo?: {
    componentName?: string(name='ComponentName', description='Set the filter condition name based on the value of ComponentType. For example, if you set ComponentType to queue, you can specify a specific queue name to obtain the resource usage of a specific queue.', example='MAPREDUCE'),
    componentType?: string(name='ComponentType', description='The resource type for filtering. Valid values:

*   engine: filters results by engine.
*   queue: filters results by queue.
*   cluster: displays the results at the cluster level.

If you do not specify this parameter, the information at the cluster level is displayed by default.', example='engine'),
  }(name='ComponentInfo', description='The resource information, which is used to filter the results.'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorComputeSummaryResponseBody = {
  data?: {
    analysis?: {
      healthyJobCount?: long(name='HealthyJobCount', description='The total number of healthy jobs.', example='3'),
      needAttentionJobCount?: long(name='NeedAttentionJobCount', description='The total number of jobs that require attention.', example='234'),
      score?: int32(name='Score', description='The score for jobs.', example='73'),
      scoreDayGrowthRatio?: float(name='ScoreDayGrowthRatio', description='The day-to-day growth rate of the score for jobs.', example='0.02'),
      subHealthyJobCount?: long(name='SubHealthyJobCount', description='The total number of sub-healthy jobs.', example='1123'),
      unhealthyJobCount?: long(name='UnhealthyJobCount', description='The total number of unhealthy jobs.', example='23'),
    }(name='Analysis', description='The resource analysis information.'),
    metrics?: {
      memSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total memory usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='memSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='12312312'),
      }(name='MemSeconds', description='The total memory consumption over time in seconds.'),
      memSecondsDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Growth ratio of memory usage in seconds per day'),
        name?: string(name='Name', description='The name of the metric.', example='memSecondsDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: float(name='Value', description='The value of the metric.', example='0.36'),
      }(name='MemSecondsDayGrowthRatio', description='The day-to-day growth rate of the total memory consumption over time in seconds.'),
      memUtilization?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of used memory to total available memory'),
        name?: string(name='Name', description='The name of the metric.', example='memUtilization'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.82'),
      }(name='MemUtilization', description='The average memory usage.'),
      readSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total cumulative size of data read in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='readSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='504888659968'),
      }(name='ReadSize', description='The total amount of data read from the file system.'),
      vcoreSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total vcore usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='vcoreSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='VCores * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='1231412'),
      }(name='VcoreSeconds', description='The total CPU consumption over time in seconds.'),
      vcoreSecondsDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Growth ratio of virtual core usage in seconds per day'),
        name?: string(name='Name', description='The name of the metric.', example='vcoreSecondsDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: float(name='Value', description='The value of the metric.', example='0.22'),
      }(name='VcoreSecondsDayGrowthRatio', description='The day-to-day growth rate of the total CPU consumption over time in seconds.'),
      vcoreUtilization?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of used vcore to total available cores'),
        name?: string(name='Name', description='The name of the metric.', example='vcoreUtilization'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: float(name='Value', description='The value of the metric.', example='32.1'),
      }(name='VcoreUtilization', description='The average CPU utilization. The meaning is the same as the %CPU parameter in the output of the top command in Linux.'),
      writeSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total cumulative size of data written in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='writeSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='6294093393920'),
      }(name='WriteSize', description='The total amount of data written to the file system.'),
    }(name='Metrics', description='The metrics.'),
  }(name='Data', description='The details of resource usage.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorComputeSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorComputeSummaryResponseBody(name='body'),
}

/**
 * @summary Obtains the information about resource usage in a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description get one specific luster engine queue by <type, name>
 *
 * @param request GetDoctorComputeSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorComputeSummaryResponse
 */
async function getDoctorComputeSummaryWithOptions(request: GetDoctorComputeSummaryRequest, runtime: Util.RuntimeOptions): GetDoctorComputeSummaryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentInfo)) {
    query['ComponentInfo'] = request.componentInfo;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorComputeSummary',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the information about resource usage in a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description get one specific luster engine queue by <type, name>
 *
 * @param request GetDoctorComputeSummaryRequest
 * @return GetDoctorComputeSummaryResponse
 */
async function getDoctorComputeSummary(request: GetDoctorComputeSummaryRequest): GetDoctorComputeSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorComputeSummaryWithOptions(request, runtime);
}

model GetDoctorHBaseClusterRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='The date.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorHBaseClusterResponseBody = {
  data?: {
    analysis?: {
      hbaseScore?: int32(name='HbaseScore', description='The overall score of the HBase cluster.', example='85'),
    }(name='Analysis', description='The analysis result.'),
    metrics?: {
      avgLoad?: {
        description?: string(name='Description', description='The description of the metric.', example='The average load under normal working conditions'),
        name?: string(name='Name', description='The name of the metric.', example='avgLoad'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='36.0'),
      }(name='AvgLoad', description='The average load.'),
      dailyReadRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of read requests per day'),
        name?: string(name='Name', description='The name of the metric.', example='dailyReadRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='430'),
      }(name='DailyReadRequest', description='The number of read requests in a day.'),
      dailyWriteRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of write requests per day'),
        name?: string(name='Name', description='The name of the metric.', example='dailyWriteRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='128'),
      }(name='DailyWriteRequest', description='The number of write requests in a day.'),
      memHeap?: {
        description?: string(name='Description', description='The description of the metric.', example='Memory heap usage in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='memHeap'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='240'),
      }(name='MemHeap', description='The memory size.'),
      normalAvgLoad?: {
        description?: string(name='Description', description='The description of the metric.', example='The average load under normal working conditions'),
        name?: string(name='Name', description='The name of the metric.', example='normalAvgLoad'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='526.4'),
      }(name='NormalAvgLoad', description='The normal average load.'),
      regionBalance?: {
        description?: string(name='Description', description='The description of the metric.', example='The ability to evenly distribute Regions on different RegionServer nodes'),
        name?: string(name='Name', description='The name of the metric.', example='regionBalance'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='1.0'),
      }(name='RegionBalance', description='The region balance degree.'),
      regionCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of regions count'),
        name?: string(name='Name', description='The name of the metric.', example='regionCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='161'),
      }(name='RegionCount', description='The number of regions.'),
      regionServerCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of region servers count'),
        name?: string(name='Name', description='The name of the metric.', example='regionServerCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='6'),
      }(name='RegionServerCount', description='The number of region servers.'),
      storeFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of store files'),
        name?: string(name='Name', description='The name of the metric.', example='storeFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='298'),
      }(name='StoreFileCount', description='The number of StoreFiles.'),
      tableCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tables'),
        name?: string(name='Name', description='The name of the metric.', example='tableCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='10'),
      }(name='TableCount', description='The number of tables.'),
      totalDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='256'),
      }(name='TotalDataSize', description='The size of the cluster.'),
      totalReadRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Total number of read requests'),
        name?: string(name='Name', description='The name of the metric.', example='totalReadRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='430'),
      }(name='TotalReadRequest', description='The total number of read requests.'),
      totalRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Total number of requests'),
        name?: string(name='Name', description='The name of the metric.', example='totalRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='576'),
      }(name='TotalRequest', description='The total number of requests in the cluster.'),
      totalWriteRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Total number of write requests'),
        name?: string(name='Name', description='The name of the metric.', example='totalWriteRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='520'),
      }(name='TotalWriteRequest', description='The total number of write requests.'),
    }(name='Metrics', description='The metric information.'),
  }(name='Data', description='The returned data.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHBaseClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHBaseClusterResponseBody(name='body'),
}

/**
 * @summary Obtains the metrics of an HBase cluster.
 *
 * @description get Doctor HBaseCluster
 *
 * @param request GetDoctorHBaseClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHBaseClusterResponse
 */
async function getDoctorHBaseClusterWithOptions(request: GetDoctorHBaseClusterRequest, runtime: Util.RuntimeOptions): GetDoctorHBaseClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHBaseCluster',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the metrics of an HBase cluster.
 *
 * @description get Doctor HBaseCluster
 *
 * @param request GetDoctorHBaseClusterRequest
 * @return GetDoctorHBaseClusterResponse
 */
async function getDoctorHBaseCluster(request: GetDoctorHBaseClusterRequest): GetDoctorHBaseClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHBaseClusterWithOptions(request, runtime);
}

model GetDoctorHBaseRegionRequest {
  clusterId?: string(name='ClusterId', description='Cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Date.

This parameter is required.', example='2023-01-01'),
  hbaseRegionId?: string(name='HbaseRegionId', description='Region ID.

This parameter is required.', example='67f6808f60a8c357103a3a95fe00610e'),
  regionId?: string(name='RegionId', description='Region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorHBaseRegionResponseBody = {
  data?: {
    metrics?: {
      dailyReadRequest?: {
        description?: string(name='Description', description='Description of the metric.', example='Number of read requests per day'),
        name?: string(name='Name', description='Name of the metric.', example='dailyReadRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='DailyReadRequest', description='Number of read requests in a single day.'),
      dailyWriteRequest?: {
        description?: string(name='Description', description='Description of the metric.', example='Number of write requests per day'),
        name?: string(name='Name', description='Name of the metric.', example='dailyWriteRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='DailyWriteRequest', description='Number of write requests in a single day.'),
      storeFileCount?: {
        description?: string(name='Description', description='Description of the metric.', example='Number of store file'),
        name?: string(name='Name', description='Metric name.', example='storeFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='100'),
      }(name='StoreFileCount', description='Store file count.'),
      totalReadRequest?: {
        description?: string(name='Description', description='Metric description.', example='Total read request'),
        name?: string(name='Name', description='Metric name.', example='totalReadRequest'),
        unit?: string(name='Unit', description='Metric unit.', example='""'),
        value?: long(name='Value', description='Metric value.', example='1000'),
      }(name='TotalReadRequest', description='Total read request count'),
      totalWriteRequest?: {
        description?: string(name='Description', description='Metric description.', example='Total Write Request'),
        name?: string(name='Name', description='Metric name.', example='totalWriteRequest'),
        unit?: string(name='Unit', description='Metric unit.', example='""'),
        value?: long(name='Value', description='Metric value.', example='1000'),
      }(name='TotalWriteRequest', description='Total write request count'),
    }(name='Metrics', description='Metrics information.'),
    regionServerHost?: string(name='RegionServerHost', description='Host of the RegionServer.', example='emr-worker-2.cluster-20****'),
    tableName?: string(name='TableName', description='Table name.', example='tb_item'),
  }(name='Data', description='Returned data.'),
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHBaseRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHBaseRegionResponseBody(name='body'),
}

/**
 * @summary Get HBase Region information.
 *
 * @description List Doctor HBase Regions
 *
 * @param request GetDoctorHBaseRegionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHBaseRegionResponse
 */
async function getDoctorHBaseRegionWithOptions(request: GetDoctorHBaseRegionRequest, runtime: Util.RuntimeOptions): GetDoctorHBaseRegionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.hbaseRegionId)) {
    query['HbaseRegionId'] = request.hbaseRegionId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHBaseRegion',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get HBase Region information.
 *
 * @description List Doctor HBase Regions
 *
 * @param request GetDoctorHBaseRegionRequest
 * @return GetDoctorHBaseRegionResponse
 */
async function getDoctorHBaseRegion(request: GetDoctorHBaseRegionRequest): GetDoctorHBaseRegionResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHBaseRegionWithOptions(request, runtime);
}

model GetDoctorHBaseRegionServerRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='The date.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  regionServerHost?: string(name='RegionServerHost', description='The host of the region server.

This parameter is required.', example='emr-worker-4.cluster-20****'),
}

model GetDoctorHBaseRegionServerResponseBody = {
  data?: {
    metrics?: {
      avgGc?: {
        description?: string(name='Description', description='The description of the metric.', example='The efficiency of garbage collection in the system'),
        name?: string(name='Name', description='The name of the metric.', example='avgGc'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='42.3'),
      }(name='AvgGc', description='The average garbage collection (GC) duration.'),
      cacheRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of the BlockCache memory size'),
        name?: string(name='Name', description='The name of the metric.', example='cacheRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='95.3'),
      }(name='CacheRatio', description='The cache hit ratio.'),
      dailyReadRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of read requests per day'),
        name?: string(name='Name', description='The name of the metric.', example='dailyReadRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='DailyReadRequest', description='The number of daily read requests.'),
      dailyReadRequestDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='The growth rate of daily read request quantity.'),
        name?: string(name='Name', description='The name of the metric.', example='dailyReadRequestDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='1.0'),
      }(name='DailyReadRequestDayGrowthRatio', description='The day-to-day increment rate of the number of daily read requests.'),
      dailyWriteRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of write requests per day'),
        name?: string(name='Name', description='The name of the metric.', example='dailyWriteRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='DailyWriteRequest', description='The number of daily write requests.'),
      dailyWriteRequestDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='The growth rate of daily write request quantity.'),
        name?: string(name='Name', description='The name of the metric.', example='dailyWriteRequestDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='1.0'),
      }(name='DailyWriteRequestDayGrowthRatio', description='The day-to-day increment rate of the number of daily write requests.'),
      regionCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of regions count'),
        name?: string(name='Name', description='The name of the metric.', example='regionCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='15'),
      }(name='RegionCount', description='The number of regions.'),
      totalReadRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Total number of read requests'),
        name?: string(name='Name', description='The name of the metric.', example='totalReadRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalReadRequest', description='The cumulative number of read requests.'),
      totalRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Total number of requests'),
        name?: string(name='Name', description='The name of the metric.', example='totalRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalRequest', description='The cumulative number of total requests.'),
      totalWriteRequest?: {
        description?: string(name='Description', description='The description of the metric.', example='Total number of write requests'),
        name?: string(name='Name', description='The name of the metric.', example='totalWriteRequest'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalWriteRequest', description='The cumulative number of write requests.'),
    }(name='Metrics', description='The metric information.'),
  }(name='Data', description='The returned data.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHBaseRegionServerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHBaseRegionServerResponseBody(name='body'),
}

/**
 * @summary Obtains the information about an HBase region server.
 *
 * @description get Doctor HBaseRegionServer
 *
 * @param request GetDoctorHBaseRegionServerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHBaseRegionServerResponse
 */
async function getDoctorHBaseRegionServerWithOptions(request: GetDoctorHBaseRegionServerRequest, runtime: Util.RuntimeOptions): GetDoctorHBaseRegionServerResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.regionServerHost)) {
    query['RegionServerHost'] = request.regionServerHost;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHBaseRegionServer',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the information about an HBase region server.
 *
 * @description get Doctor HBaseRegionServer
 *
 * @param request GetDoctorHBaseRegionServerRequest
 * @return GetDoctorHBaseRegionServerResponse
 */
async function getDoctorHBaseRegionServer(request: GetDoctorHBaseRegionServerRequest): GetDoctorHBaseRegionServerResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHBaseRegionServerWithOptions(request, runtime);
}

model GetDoctorHBaseTableRequest {
  clusterId?: string(name='ClusterId', description='Cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Date.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='Region ID.

This parameter is required.', example='cn-hangzhou'),
  tableName?: string(name='TableName', description='Table name.

This parameter is required.', example='namespace1:tb_item'),
}

model GetDoctorHBaseTableResponseBody = {
  data?: {
    analysis?: {
      readRequestHotspotRegionList?: [ string ](name='ReadRequestHotspotRegionList', description='List of read hotspot regions.', example='null'),
      readRequestUnbalanceSuggestion?: string(name='ReadRequestUnbalanceSuggestion', description='Description of read imbalance.', example='read request unbalance is <p class=\\\\"report-detail-topic\\\\">表分区总数量为14，分区平均读请求数量为5032486，以下分区存在读请求热点访问：</p><ul class=\\\\"report-detail-ul\\\\"><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-4 Region Id： 4ac818a3ab3fd727490a5b4d4dac7667 读请求数量： 15485664</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： 021b387ae92959def65041e25eade3aa 读请求数量： 7731980</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： d58f33abfe857e5fd0045eaa31c93df8 读请求数量： 7705237</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： 4ca84757a7d0948b8552cfeebefa25a9 读请求数量： 7703492</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-4 Region Id： 1018192dae42995fc75c6d5b5981a9b7 读请求数量： 7695284</li></ul><p style=\\\\"line-height： 16px; font-size： 16px; margin： 0 auto\\\\">&nbsp;</p>'),
      requestHotspotRegionList?: [ string ](name='RequestHotspotRegionList', description='List of read/write hotspot regions.', example='null'),
      requestUnbalanceSuggestion?: string(name='RequestUnbalanceSuggestion', description='Description of read/write imbalance.', example='read request unbalance is <p class=\\\\"report-detail-topic\\\\">表分区总数量为14，分区平均读请求数量为5032486，以下分区存在读请求热点访问：</p><ul class=\\\\"report-detail-ul\\\\"><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-4 Region Id： 4ac818a3ab3fd727490a5b4d4dac7667 读请求数量： 15485664</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： 021b387ae92959def65041e25eade3aa 读请求数量： 7731980</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： d58f33abfe857e5fd0045eaa31c93df8 读请求数量： 7705237</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： 4ca84757a7d0948b8552cfeebefa25a9 读请求数量： 7703492</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-4 Region Id： 1018192dae42995fc75c6d5b5981a9b7 读请求数量： 7695284</li></ul><p style=\\\\"line-height： 16px; font-size： 16px; margin： 0 auto\\\\">&nbsp;</p>'),
      tableScore?: int32(name='TableScore', description='Table score.', example='85'),
      writeRequestHotspotRegionList?: [ string ](name='WriteRequestHotspotRegionList', description='List of write hotspot regions.', example='null'),
      writeRequestUnbalanceSuggestion?: string(name='WriteRequestUnbalanceSuggestion', description='Description of write imbalance.', example='write request unbalance is <p class=\\\\"report-detail-topic\\\\">表分区总数量为15，分区平均写请求数量为769954，以下分区存在写请求热点访问：</p><ul class=\\\\"report-detail-ul\\\\"><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： 4a938c08750869c47b7a92edeeec2ccc 写请求数量： 2115051</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： b4d21974df92bdf3589e63e4da1fc923 写请求数量： 1592509</li><li class=\\\\".report-detail-li\\\\">RegionServer： emr-worker-2 Region Id： 25eb6717470f4ddbabe9187ff0fc0cb3 写请求数量： 1585420</li></ul><p style=\\\\"line-height： 16px; font-size： 16px; margin： 0 auto\\\\">&nbsp;</p>'),
    }(name='Analysis', description='Diagnostic results.'),
    metrics?: {
      coldAccessDay?: {
        description?: string(name='Description', description='Description of the metric.', example='Cold access day'),
        name?: string(name='Name', description='Name of the metric.', example='coldAccessDay'),
        unit?: string(name='Unit', description='Unit of the metric.', example='day'),
        value?: long(name='Value', description='Value of the metric.', example='3'),
      }(name='ColdAccessDay', description='Number of days the table has not been accessed.'),
      coldConfigDay?: {
        description?: string(name='Description', description='Description of the metric.', example='Cold config day'),
        name?: string(name='Name', description='Metric name.', example='coldConfigDay'),
        unit?: string(name='Unit', description='Unit of the metric.', example='day'),
        value?: long(name='Value', description='Metric value.', example='10'),
      }(name='ColdConfigDay', description='Cold data access days configuration.'),
      coldDataSize?: {
        description?: string(name='Description', description='Metric description.', example='Size of the cold data size'),
        name?: string(name='Name', description='Metric name.', example='coldDataSize'),
        unit?: string(name='Unit', description='Metric unit.', example='""'),
        value?: long(name='Value', description='Metric value.', example='1000'),
      }(name='ColdDataSize', description='Cold data size.'),
      dailyReadRequest?: {
        description?: string(name='Description', description='Description of the metric.', example='test-update'),
        name?: string(name='Name', description='Name of the item.', example='dailyReadRequest'),
        unit?: string(name='Unit', description='Unit of the metric.', example='""'),
        value?: long(name='Value', description='Value of the metric.', example='1000'),
      }(name='DailyReadRequest', description='Number of read requests per day.'),
      dailyReadRequestDayGrowthRatio?: {
        description?: string(name='Description', description='Description of the metric.', example='Day growth ratio of table size'),
        name?: string(name='Name', description='Metric name.', example='dailyReadRequestDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='1.5'),
      }(name='DailyReadRequestDayGrowthRatio', description='Daily growth ratio of daily read requests.'),
      dailyWriteRequest?: {
        description?: string(name='Description', description='Description of the metric.', example='Number of write requests per day'),
        name?: string(name='Name', description='Name of the metric.', example='dailyWriteRequest'),
        unit?: string(name='Unit', description='Unit of the metric.', example='""'),
        value?: long(name='Value', description='Value of the metric.', example='1000'),
      }(name='DailyWriteRequest', description='Number of write requests per day.'),
      dailyWriteRequestDayGrowthRatio?: {
        description?: string(name='Description', description='Description of the metric.', example='The balance of distributing requests'),
        name?: string(name='Name', description='Name of the metric.', example='dailyWriteRequestDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='DailyWriteRequestDayGrowthRatio', description='Daily write request growth ratio.'),
      freezeConfigDay?: {
        description?: string(name='Description', description='Description of the metric.', example='Freeze config day'),
        name?: string(name='Name', description='Name of the metric.', example='freezeConfigDay'),
        unit?: string(name='Unit', description='Unit of the metric.', example='day'),
        value?: long(name='Value', description='Value of the metric.', example='10'),
      }(name='FreezeConfigDay', description='Configuration for the number of days cold data is accessed.'),
      freezeDataSize?: {
        description?: string(name='Description', description='Metric description.', example='Size of the freeze data size'),
        name?: string(name='Name', description='Metric name.', example='freezeDataSize'),
        unit?: string(name='Unit', description='Metric unit.', example='MB'),
        value?: long(name='Value', description='Metric value.', example='1000'),
      }(name='FreezeDataSize', description='Frozen data size.'),
      hotDataSize?: {
        description?: string(name='Description', description='Description of the metric.', example='Size of the hot data size'),
        name?: string(name='Name', description='Name of the metric.', example='hotDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The metric value.', example='1000'),
      }(name='HotDataSize', description='Hot data size.'),
      locality?: {
        description?: string(name='Description', description='Description of the metric.', example='The locality of data'),
        name?: string(name='Name', description='Name of the metric.', example='locality'),
        unit?: string(name='Unit', description='Unit of the metric.', example='""'),
        value?: float(name='Value', description='Value of the metric.', example='0.5'),
      }(name='Locality', description='Locality rate.'),
      readRequestBalance?: {
        description?: string(name='Description', description='Description of the metric.', example='The balance of distributing read requests'),
        name?: string(name='Name', description='Name of the metric.', example='readRequestBalance'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='ReadRequestBalance', description='Read request balance.'),
      regionBalance?: {
        description?: string(name='Description', description='Description of the metric.', example='The ability to evenly distribute Regions on different RegionServer nodes'),
        name?: string(name='Name', description='Metric name.', example='regionBalance'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The metric value.', example='1.0'),
      }(name='RegionBalance', description='Region balance.'),
      regionCount?: {
        description?: string(name='Description', description='Metric description.', example='Number of regions count'),
        name?: string(name='Name', description='Metric name.', example='regionCount'),
        unit?: string(name='Unit', description='Metric unit.', example='""'),
        value?: long(name='Value', description='Metric value.', example='10'),
      }(name='RegionCount', description='Number of regions.'),
      regionCountDayGrowthRatio?: {
        description?: string(name='Description', description='Metric description.', example='Day growth ratio of region count'),
        name?: string(name='Name', description='Metric name.', example='regionCountDayGrowthRatio'),
        unit?: string(name='Unit', description='Metric unit.', example='""'),
        value?: float(name='Value', description='Metric value.', example='0.8'),
      }(name='RegionCountDayGrowthRatio', description='Daily incremental ratio of regions'),
      regionServerCount?: {
        description?: string(name='Description', description='Metric description.', example='Number of region servers count'),
        name?: string(name='Name', description='Metric name.', example='regionServerCount'),
        unit?: string(name='Unit', description='Metric unit.', example='“”'),
        value?: long(name='Value', description='Usage.', example='10'),
      }(name='RegionServerCount', description='Number of RegionServers.'),
      requestBalance?: {
        description?: string(name='Description', description='Description of the metric.', example='The balance of distributing requests'),
        name?: string(name='Name', description='Name of the metric.', example='requestBalance'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The metric value.', example='1.0'),
      }(name='RequestBalance', description='Request balance.'),
      storeFileCount?: {
        description?: string(name='Description', description='Description of the metric.', example='Number of store files'),
        name?: string(name='Name', description='Name of the metric.', example='storeFileCount'),
        unit?: string(name='Unit', description='Unit of the metric.', example='""'),
        value?: long(name='Value', description='Value of the metric.', example='1000'),
      }(name='StoreFileCount', description='Number of store files.'),
      storeFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='Metric description.', example='Day growth ratio of store file count'),
        name?: string(name='Name', description='Metric name.', example='storeFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='Metric unit.', example='""'),
        value?: float(name='Value', description='Metric value.', example='1.5'),
      }(name='StoreFileCountDayGrowthRatio', description='Daily growth ratio of store file count.'),
      tableSize?: {
        description?: string(name='Description', description='Description of the metric.', example='Size of the table'),
        name?: string(name='Name', description='Metric name.', example='tableSize'),
        unit?: string(name='Unit', description='Unit of the metric', example='""'),
        value?: long(name='Value', description='Metric value.', example='tb_item'),
      }(name='TableSize', description='Table size.'),
      tableSizeDayGrowthRatio?: {
        description?: string(name='Description', description='Metric description.', example='Day growth ratio of table size'),
        name?: string(name='Name', description='Metric name.', example='tableSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='Metric unit.', example='""'),
        value?: float(name='Value', description='Metric value.', example='1.5'),
      }(name='TableSizeDayGrowthRatio', description='Daily growth ratio of table size.'),
      warmConfigDay?: {
        description?: string(name='Description', description='Metric description.', example='Size of the warm data size'),
        name?: string(name='Name', description='Metric name.', example='warmConfigDay'),
        unit?: string(name='Unit', description='Metric unit.', example='MB'),
        value?: long(name='Value', description='Metric value.', example='1000'),
      }(name='WarmConfigDay', description='Warm data access days configuration.'),
      warmDataSize?: {
        description?: string(name='Description', description='Description of the metric.', example='Size of the warm data size'),
        name?: string(name='Name', description='Name of the metric.', example='warmDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='Usage rate.', example='1000'),
      }(name='WarmDataSize', description='Warm data size.'),
      writeRequestBalance?: {
        description?: string(name='Description', description='Description of the metric.', example='The balance of distributing write requests'),
        name?: string(name='Name', description='Name of the metric.', example='writeRequestBalance'),
        unit?: string(name='Unit', description='Unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='WriteRequestBalance', description='Write request balance.'),
    }(name='Metrics', description='Metrics information.'),
  }(name='Data', description='Returned data.'),
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHBaseTableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHBaseTableResponseBody(name='body'),
}

/**
 * @summary Get HBase Table information.
 *
 * @description get Doctor HBaseTable
 *
 * @param request GetDoctorHBaseTableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHBaseTableResponse
 */
async function getDoctorHBaseTableWithOptions(request: GetDoctorHBaseTableRequest, runtime: Util.RuntimeOptions): GetDoctorHBaseTableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.tableName)) {
    query['TableName'] = request.tableName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHBaseTable',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get HBase Table information.
 *
 * @description get Doctor HBaseTable
 *
 * @param request GetDoctorHBaseTableRequest
 * @return GetDoctorHBaseTableResponse
 */
async function getDoctorHBaseTable(request: GetDoctorHBaseTableRequest): GetDoctorHBaseTableResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHBaseTableWithOptions(request, runtime);
}

model GetDoctorHDFSClusterRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorHDFSClusterResponseBody = {
  data?: {
    analysis?: {
      hdfsScore?: int32(name='HdfsScore', description='The overall score of HDFS storage resources.', example='55'),
    }(name='Analysis', description='The analysis results.'),
    metrics?: {
      coldDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of cold data'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='-182636577752'),
      }(name='ColdDataDayGrowthSize', description='The daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      coldDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Cold data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='ColdDataRatio', description='The proportion of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      coldDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='5570958082267'),
      }(name='ColdDataSize', description='The amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      coldDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='-0.03'),
      }(name='ColdDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      emptyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='15595897'),
      }(name='EmptyFileCount', description='The number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.005'),
      }(name='EmptyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='114'),
      }(name='EmptyFileDayGrowthCount', description='The daily increment of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.3'),
      }(name='EmptyFileRatio', description='The proportion of empty files. Empty files are those with a size of 0 MB.'),
      freezeDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='-167683929450'),
      }(name='FreezeDataDayGrowthSize', description='The daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.12'),
      }(name='FreezeDataRatio', description='The proportion of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1231312431'),
      }(name='FreezeDataSize', description='The amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='-0.09'),
      }(name='FreezeDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      hotDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of hot data'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='123154'),
      }(name='HotDataDayGrowthSize', description='The daily increment of the amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
      hotDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Hot data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.22'),
      }(name='HotDataRatio', description='The proportion of hot data. Hot data refers to data that is accessed in recent seven days.'),
      hotDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='6701531944206'),
      }(name='HotDataSize', description='The amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
      hotDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.1114'),
      }(name='HotDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
      largeFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='123'),
      }(name='LargeFileCount', description='The number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.39'),
      }(name='LargeFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: long(name='Value', description='The value of the metric.', example='2'),
      }(name='LargeFileDayGrowthCount', description='The daily increment of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.22'),
      }(name='LargeFileRatio', description='The proportion of large files. Large files are those with a size greater than 1 GB.'),
      mediumFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='234'),
      }(name='MediumFileCount', description='The number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.19'),
      }(name='MediumFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='176'),
      }(name='MediumFileDayGrowthCount', description='The daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.21'),
      }(name='MediumFileRatio', description='The proportion of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      smallFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='12345'),
      }(name='SmallFileCount', description='The number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.02'),
      }(name='SmallFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='12321'),
      }(name='SmallFileDayGrowthCount', description='The daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.19'),
      }(name='SmallFileRatio', description='The proportion of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      tinyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='232131'),
      }(name='TinyFileCount', description='The number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.003'),
      }(name='TinyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='-123'),
      }(name='TinyFileDayGrowthCount', description='The daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.19'),
      }(name='TinyFileRatio', description='The proportion of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      totalDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of total data'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='256482228248'),
      }(name='TotalDataDayGrowthSize', description='The daily incremental of the total data volume.'),
      totalDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='62086342083623'),
      }(name='TotalDataSize', description='The total amount of data.'),
      totalDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total data size'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.14'),
      }(name='TotalDataSizeDayGrowthRatio', description='The day-to-day growth rate of the total data volume.'),
      totalFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='51683279'),
      }(name='TotalFileCount', description='The total number of files.'),
      totalFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.02'),
      }(name='TotalFileCountDayGrowthRatio', description='The day-to-day growth rate of the total number of files.'),
      totalFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: long(name='Value', description='The value of the metric.', example='27809'),
      }(name='TotalFileDayGrowthCount', description='The daily increment of the total number of files.'),
      warmDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='-64806998319'),
      }(name='WarmDataDayGrowthSize', description='The daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
      warmDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.12'),
      }(name='WarmDataRatio', description='The proportion of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
      warmDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='4062349775577'),
      }(name='WarmDataSize', description='The amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
      warmDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='-0.015'),
      }(name='WarmDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
    }(name='Metrics', description='The metric information.'),
  }(name='Data', description='The HDFS analysis results.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHDFSClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHDFSClusterResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of the Hadoop Distributed File System (HDFS) storage resources of a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor HBaseTableRegions
 *
 * @param request GetDoctorHDFSClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHDFSClusterResponse
 */
async function getDoctorHDFSClusterWithOptions(request: GetDoctorHDFSClusterRequest, runtime: Util.RuntimeOptions): GetDoctorHDFSClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHDFSCluster',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of the Hadoop Distributed File System (HDFS) storage resources of a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor HBaseTableRegions
 *
 * @param request GetDoctorHDFSClusterRequest
 * @return GetDoctorHDFSClusterResponse
 */
async function getDoctorHDFSCluster(request: GetDoctorHDFSClusterRequest): GetDoctorHDFSClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHDFSClusterWithOptions(request, runtime);
}

model GetDoctorHDFSDirectoryRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  dirPath?: string(name='DirPath', description='The directory name. The depth of the directory is not greater than five.

This parameter is required.', example='/tmp/test'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorHDFSDirectoryResponseBody = {
  data?: {
    depth?: int32(name='Depth', description='The directory level.', example='2'),
    group?: string(name='Group', description='The group to which the directory belongs.', example='DW'),
    metrics?: {
      coldDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of cold data'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='-182636577752'),
      }(name='ColdDataDayGrowthSize', description='The daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='5570958082267'),
      }(name='ColdDataSize', description='The amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='-0.03'),
      }(name='ColdDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      emptyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='15595897'),
      }(name='EmptyFileCount', description='The number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.005'),
      }(name='EmptyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='114'),
      }(name='EmptyFileDayGrowthCount', description='The daily increment of the number of empty files. Empty files are those with a size of 0 MB.'),
      freezeDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='-167683929450'),
      }(name='FreezeDataDayGrowthSize', description='The daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1231312431'),
      }(name='FreezeDataSize', description='The amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='-0.09'),
      }(name='FreezeDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      hotDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of hot data'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='123154'),
      }(name='HotDataDayGrowthSize', description='The daily increment of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='6701531944206'),
      }(name='HotDataSize', description='The amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.1114'),
      }(name='HotDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      largeFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='123'),
      }(name='LargeFileCount', description='The number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.39'),
      }(name='LargeFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='2'),
      }(name='LargeFileDayGrowthCount', description='The daily increment of the number of large files. Large files are those with a size greater than 1 GB.'),
      mediumFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='234'),
      }(name='MediumFileCount', description='The number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.19'),
      }(name='MediumFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='176'),
      }(name='MediumFileDayGrowthCount', description='The daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      smallFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='12345'),
      }(name='SmallFileCount', description='The number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.02'),
      }(name='SmallFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='12345'),
      }(name='SmallFileDayGrowthCount', description='The daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      tinyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='232131'),
      }(name='TinyFileCount', description='The number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.003'),
      }(name='TinyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='-123'),
      }(name='TinyFileDayGrowthCount', description='The daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      totalDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of total data'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='256482228248'),
      }(name='TotalDataDayGrowthSize', description='The daily incremental of the total amount of data.'),
      totalDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='62086342083623'),
      }(name='TotalDataSize', description='The total amount of data.'),
      totalDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total data size'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.14'),
      }(name='TotalDataSizeDayGrowthRatio', description='The day-to-day growth rate of the total data volume.'),
      totalFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='51683279'),
      }(name='TotalFileCount', description='The total number of files.'),
      totalFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.02'),
      }(name='TotalFileCountDayGrowthRatio', description='The day-to-day growth rate of the total number of files.'),
      totalFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='27809'),
      }(name='TotalFileDayGrowthCount', description='The daily increment of the total number of files.'),
      warmDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='-64806998319'),
      }(name='WarmDataDayGrowthSize', description='The daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='4062349775577'),
      }(name='WarmDataSize', description='The amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='-0.015'),
      }(name='WarmDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
    }(name='Metrics', description='The metric information.'),
    user?: string(name='User', description='The directory owner.', example='DW'),
  }(name='Data', description='The analysis results of the HDFS directory.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHDFSDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHDFSDirectoryResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of a specific Hadoop Distributed File System (HDFS) directory of a cluster. The depth of the directory is not greater than five.
 *
 * @description get Doctor HDFSNode
 *
 * @param request GetDoctorHDFSDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHDFSDirectoryResponse
 */
async function getDoctorHDFSDirectoryWithOptions(request: GetDoctorHDFSDirectoryRequest, runtime: Util.RuntimeOptions): GetDoctorHDFSDirectoryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.dirPath)) {
    query['DirPath'] = request.dirPath;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHDFSDirectory',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of a specific Hadoop Distributed File System (HDFS) directory of a cluster. The depth of the directory is not greater than five.
 *
 * @description get Doctor HDFSNode
 *
 * @param request GetDoctorHDFSDirectoryRequest
 * @return GetDoctorHDFSDirectoryResponse
 */
async function getDoctorHDFSDirectory(request: GetDoctorHDFSDirectoryRequest): GetDoctorHDFSDirectoryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHDFSDirectoryWithOptions(request, runtime);
}

model GetDoctorHDFSUGIRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  name?: string(name='Name', description='Set this parameter based on the value of Type.

This parameter is required.', example='DW'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  type?: string(name='Type', description='The filter condition. Valid values:

*   user
*   group

This parameter is required.', example='user'),
}

model GetDoctorHDFSUGIResponseBody = {
  data?: {
    metrics?: {
      totalDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
        unit?: string(name='Unit', description='The unit.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='40440503'),
      }(name='TotalDataSize', description='The total data size.'),
      totalDirCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of total dirs'),
        name?: string(name='Name', description='The name of the metric.', example='totalDirCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='123'),
      }(name='TotalDirCount', description='The total number of directories.'),
      totalFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='34'),
      }(name='TotalFileCount', description='The total number of files.'),
    }(name='Metrics', description='The metric information.'),
  }(name='Data', description='The results of HDFS analysis.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHDFSUGIResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHDFSUGIResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of Hadoop Distributed File System (HDFS) storage resources for a specific owner or group on E-MapReduce (EMR) Doctor.
 *
 * @description get Doctor HDFS UGI
 *
 * @param request GetDoctorHDFSUGIRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHDFSUGIResponse
 */
async function getDoctorHDFSUGIWithOptions(request: GetDoctorHDFSUGIRequest, runtime: Util.RuntimeOptions): GetDoctorHDFSUGIResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.name)) {
    query['Name'] = request.name;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHDFSUGI',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of Hadoop Distributed File System (HDFS) storage resources for a specific owner or group on E-MapReduce (EMR) Doctor.
 *
 * @description get Doctor HDFS UGI
 *
 * @param request GetDoctorHDFSUGIRequest
 * @return GetDoctorHDFSUGIResponse
 */
async function getDoctorHDFSUGI(request: GetDoctorHDFSUGIRequest): GetDoctorHDFSUGIResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHDFSUGIWithOptions(request, runtime);
}

model GetDoctorHiveClusterRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorHiveClusterResponseBody = {
  data?: {
    analysis?: {
      hiveDistributionScore?: int32(name='HiveDistributionScore', description='The score for the distribution of files of different sizes stored in the Hive cluster.', example='80'),
      hiveFormatScore?: int32(name='HiveFormatScore', description='The score for the distribution of files stored in different formats in the Hive cluster.', example='80'),
      hiveFrequencyScore?: int32(name='HiveFrequencyScore', description='The score for the access frequency of the Hive cluster.', example='80'),
      hiveScore?: int32(name='HiveScore', description='The overall score of the Hive cluster.', example='80'),
    }(name='Analysis', description='The analysis results.'),
    formats?: [ 
      {
        formatName?: string(name='FormatName', description='The name of the storage format.', example='TextInputFormat'),
        formatRatio?: float(name='FormatRatio', description='The proportion of the data in the format.', example='0.5'),
        formatSize?: long(name='FormatSize', description='The amount of data in the format.', example='100'),
        formatSizeUnit?: string(name='FormatSizeUnit', description='The unit of the amount of data in the format.', example='MB'),
      }
    ](name='Formats', description='The information from the perspective of storage formats.'),
    metrics?: {
      coldDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of cold data'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='ColdDataDayGrowthSize', description='The daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Cold data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='ColdDataRatio', description='The proportion of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of cold files'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='ColdDataSize', description='The amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='ColdDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      databaseCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of databases'),
        name?: string(name='Name', description='The name of the metric.', example='databaseCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='DatabaseCount', description='The number of databases.'),
      emptyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='EmptyFileCount', description='The number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='EmptyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='EmptyFileDayGrowthCount', description='The daily increment of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='EmptyFileRatio', description='The proportion of empty files. Empty files are those with a size of 0 MB.'),
      freezeDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='FreezeDataDayGrowthSize', description='The daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.12'),
      }(name='FreezeDataRatio', description='The proportion of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze files'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='FreezeDataSize', description='The amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='FreezeDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      hotDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of hot data'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='HotDataDayGrowthSize', description='The daily increment of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Hot data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='HotDataRatio', description='The proportion of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of hot files'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='HotDataSize', description='The amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='HotDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      largeFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='LargeFileCount', description='The number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='LargeFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='LargeFileDayGrowthCount', description='The daily increment of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='LargeFileRatio', description='The proportion of large files. Large files are those with a size greater than 1 GB.'),
      mediumFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='MediumFileCount', description='The number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='MediumFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: long(name='Value', description='The value of the metric.', example='178'),
      }(name='MediumFileDayGrowthCount', description='The daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='MediumFileRatio', description='The proportion of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      partitionNum?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of partitions'),
        name?: string(name='Name', description='The name of the metric.', example='partitionNum'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='PartitionNum', description='The number of partitions.'),
      smallFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='SmallFileCount', description='The number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='SmallFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='SmallFileDayGrowthCount', description='The daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='SmallFileRatio', description='The proportion of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      tableCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tables'),
        name?: string(name='Name', description='The name of the metric.', example='tableCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TableCount', description='The number of tables.'),
      tinyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TinyFileCount', description='The number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TinyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='day growth count of tiny files'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TinyFileDayGrowthCount', description='The daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TinyFileRatio', description='The proportion of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      totalDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of total data'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalDataDayGrowthSize', description='The daily incremental of the amount of total data.'),
      totalDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalDataSize', description='The total amount of data.'),
      totalDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total data size'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TotalDataSizeDayGrowthRatio', description='The day-to-day growth rate of the total data volume.'),
      totalFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalFileCount', description='The total number of files.'),
      totalFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TotalFileCountDayGrowthRatio', description='The day-to-day growth rate of the total number of files.'),
      totalFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='27800'),
      }(name='TotalFileDayGrowthCount', description='The daily increment of the total number of files.'),
      warmDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='-100'),
      }(name='WarmDataDayGrowthSize', description='The daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='WarmDataRatio', description='The proportion of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of warm files'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='WarmDataSize', description='The amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='WarmDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
    }(name='Metrics', description='The metric information.'),
  }(name='Data', description='The analysis results of the Hive cluster.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHiveClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHiveClusterResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of a Hive cluster.
 *
 * @description list Doctor Hive Cluster
 *
 * @param request GetDoctorHiveClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHiveClusterResponse
 */
async function getDoctorHiveClusterWithOptions(request: GetDoctorHiveClusterRequest, runtime: Util.RuntimeOptions): GetDoctorHiveClusterResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHiveCluster',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of a Hive cluster.
 *
 * @description list Doctor Hive Cluster
 *
 * @param request GetDoctorHiveClusterRequest
 * @return GetDoctorHiveClusterResponse
 */
async function getDoctorHiveCluster(request: GetDoctorHiveClusterRequest): GetDoctorHiveClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHiveClusterWithOptions(request, runtime);
}

model GetDoctorHiveDatabaseRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  databaseName?: string(name='DatabaseName', description='The database name.

This parameter is required.', example='db1'),
  dateTime?: string(name='DateTime', description='The query date.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorHiveDatabaseResponseBody = {
  data?: {
    analysis?: {
      hiveDistributionScore?: int32(name='HiveDistributionScore', description='The score for the file sizes of the Hive database.', example='85'),
      hiveFormatScore?: int32(name='HiveFormatScore', description='The score for the data formats of the Hive database.', example='85'),
      hiveFrequencyScore?: int32(name='HiveFrequencyScore', description='The score for the access frequency of the Hive database.', example='85'),
      hiveScore?: int32(name='HiveScore', description='The overall score of the Hive database.', example='85'),
    }(name='Analysis', description='The analysis results.'),
    formats?: [ 
      {
        formatDayGrowthSize?: long(name='FormatDayGrowthSize', description='The daily increment of data in the format.', example='1000'),
        formatName?: string(name='FormatName', description='The name of the storage format.', example='TextInputFormat'),
        formatRatio?: float(name='FormatRatio', description='The proportion of the data in the format.', example='0.5'),
        formatSize?: long(name='FormatSize', description='The amount of data in the format.', example='1000'),
        formatSizeDayGrowthRatio?: float(name='FormatSizeDayGrowthRatio', description='The day-to-day growth rate of data in the format.', example='0.5'),
        formatSizeUnit?: string(name='FormatSizeUnit', description='The unit of the amount of data in the format.', example='MB'),
      }
    ](name='Formats', description='The information from the perspective of storage formats.'),
    metrics?: {
      coldDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of cold data'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='ColdDataDayGrowthSize', description='The daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Cold data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='ColdDataRatio', description='The proportion of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of cold files'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='ColdDataSize', description='The amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      coldDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='ColdDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
      emptyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='EmptyFileCount', description='The number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='EmptyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='EmptyFileDayGrowthCount', description='The daily increment of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='EmptyFileRatio', description='The proportion of empty files. Empty files are those with a size of 0 MB.'),
      freezeDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='FreezeDataDayGrowthSize', description='The daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='FreezeDataRatio', description='The proportion of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze files'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='FreezeDataSize', description='The amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='FreezeDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      hotDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of hot data'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='HotDataDayGrowthSize', description='The daily increment of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Hot data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='HotDataRatio', description='The proportion of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of hot files'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='HotDataSize', description='The amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      hotDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='HotDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
      largeFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='LargeFileCount', description='The number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='LargeFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='LargeFileDayGrowthCount', description='The daily increment of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='LargeFileRatio', description='The proportion of large files. Large files are those with a size greater than 1 GB.'),
      mediumFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='MediumFileCount', description='The number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='MediumFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='MediumFileDayGrowthCount', description='The daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='MediumFileRatio', description='The proportion of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      partitionNum?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of partitions'),
        name?: string(name='Name', description='The name of the metric.', example='partitionNum'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='PartitionNum', description='The number of partitions.'),
      smallFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='SmallFileCount', description='The number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='SmallFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='SmallFileDayGrowthCount', description='The daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='SmallFileRatio', description='The proportion of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      tableCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tables'),
        name?: string(name='Name', description='The name of the metric.', example='tableCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TableCount', description='The number of tables.'),
      tinyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TinyFileCount', description='The number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TinyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TinyFileDayGrowthCount', description='The daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TinyFileRatio', description='The proportion of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      totalDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of total data'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalDataDayGrowthSize', description='The daily incremental of the total amount of data.'),
      totalDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalDataSize', description='The total amount of data.'),
      totalDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total data size'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TotalDataSizeDayGrowthRatio', description='The day-to-day growth rate of the total data volume.'),
      totalFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalFileCount', description='The total number of files.'),
      totalFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='TotalFileCountDayGrowthRatio', description='The day-to-day growth rate of the total number of files.'),
      totalFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='TotalFileDayGrowthCount', description='The daily increment of the total number of files.'),
      warmDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='WarmDataDayGrowthSize', description='The daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='WarmDataRatio', description='The proportion of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of warm files'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='1000'),
      }(name='WarmDataSize', description='The amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      warmDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.5'),
      }(name='WarmDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
    }(name='Metrics', description='The metric information.'),
  }(name='Data', description='The analysis results of the Hive database.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHiveDatabaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHiveDatabaseResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of a Hive database.
 *
 * @description get Doctor Hive Database
 *
 * @param request GetDoctorHiveDatabaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHiveDatabaseResponse
 */
async function getDoctorHiveDatabaseWithOptions(request: GetDoctorHiveDatabaseRequest, runtime: Util.RuntimeOptions): GetDoctorHiveDatabaseResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.databaseName)) {
    query['DatabaseName'] = request.databaseName;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHiveDatabase',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of a Hive database.
 *
 * @description get Doctor Hive Database
 *
 * @param request GetDoctorHiveDatabaseRequest
 * @return GetDoctorHiveDatabaseResponse
 */
async function getDoctorHiveDatabase(request: GetDoctorHiveDatabaseRequest): GetDoctorHiveDatabaseResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHiveDatabaseWithOptions(request, runtime);
}

model GetDoctorHiveTableRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  tableName?: string(name='TableName', description='The table name. The table name must follow the rule in Hive. A name in the {database name.table identifier} format uniquely identifies a table.

This parameter is required.', example='dw.dwd_creta_service_order_long_renew_long_da'),
}

model GetDoctorHiveTableResponseBody = {
  data?: {
    analysis?: {
      hiveDistributionScore?: int32(name='HiveDistributionScore', description='The score for the distribution of files of different sizes stored in the Hive table.', example='80'),
      hiveFormatScore?: int32(name='HiveFormatScore', description='The score for the distribution of files stored in different formats in the Hive table.', example='60'),
      hiveFrequencyScore?: int32(name='HiveFrequencyScore', description='The score for the access frequency of the Hive table.', example='70'),
      hiveScore?: int32(name='HiveScore', description='The overall score of the Hive table.', example='80'),
    }(name='Analysis', description='The analysis results.'),
    formats?: [ 
      {
        formatDayGrowthSize?: long(name='FormatDayGrowthSize', description='The daily amount increment of the data in a specific storage format.', example='1232124'),
        formatName?: string(name='FormatName', description='The name of the storage format.', example='TextInputFormat'),
        formatRatio?: float(name='FormatRatio', description='The ratio of the data in a specific storage format.', example='0.23'),
        formatSize?: long(name='FormatSize', description='The size of storage format-specific data.', example='506930200'),
        formatSizeDayGrowthRatio?: float(name='FormatSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of the data in a specific storage format.', example='0.04'),
        formatSizeUnit?: string(name='FormatSizeUnit', description='The unit of the data size.', example='MB'),
      }
    ](name='Formats', description='The information from the perspective of formats.'),
    metrics?: {
      coldDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of cold data'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='217715'),
      }(name='ColdDataDayGrowthSize', description='The daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      coldDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Cold data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='ColdDataRatio', description='The proportion of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      coldDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='217715'),
      }(name='ColdDataSize', description='The amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      coldDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of cold data size'),
        name?: string(name='Name', description='The name of the metric.', example='coldDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='ColdDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
      emptyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='3123'),
      }(name='EmptyFileCount', description='The number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='EmptyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='-20'),
      }(name='EmptyFileDayGrowthCount', description='The daily increment of the number of empty files. Empty files are those with a size of 0 MB.'),
      emptyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of empty files'),
        name?: string(name='Name', description='The name of the metric.', example='emptyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='EmptyFileRatio', description='The proportion of empty files. Empty files are those with a size of 0 MB.'),
      freezeDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='33229309'),
      }(name='FreezeDataDayGrowthSize', description='The daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze data'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.98'),
      }(name='FreezeDataRatio', description='The proportion of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='33229309'),
      }(name='FreezeDataSize', description='The amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      freezeDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of freeze data size'),
        name?: string(name='Name', description='The name of the metric.', example='freezeDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='FreezeDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
      hotDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of hot data'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='203431'),
      }(name='HotDataDayGrowthSize', description='The daily increment of the amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
      hotDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Hot data ratio'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='HotDataRatio', description='The proportion of hot data. Hot data refers to data that is accessed in recent seven days.'),
      hotDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='203431'),
      }(name='HotDataSize', description='The amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
      hotDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of hot data size'),
        name?: string(name='Name', description='The name of the metric.', example='hotDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='HotDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
      largeFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: long(name='Value', description='The value of the metric.', example='123'),
      }(name='LargeFileCount', description='The number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='LargeFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='40'),
      }(name='LargeFileDayGrowthCount', description='The daily increment of the number of large files. Large files are those with a size greater than 1 GB.'),
      largeFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of large files'),
        name?: string(name='Name', description='The name of the metric.', example='largeFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.02'),
      }(name='LargeFileRatio', description='The proportion of large files. Large files are those with a size greater than 1 GB.'),
      mediumFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: long(name='Value', description='The value of the metric.', example='5'),
      }(name='MediumFileCount', description='The number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='MediumFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='20'),
      }(name='MediumFileDayGrowthCount', description='The daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      mediumFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of medium files'),
        name?: string(name='Name', description='The name of the metric.', example='mediumFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.80'),
      }(name='MediumFileRatio', description='The proportion of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
      partitionNum?: {
        description?: string(name='Description', description='The description of the metric.', example='number of partitions'),
        name?: string(name='Name', description='The name of the metric.', example='partitionNum'),
        unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
        value?: long(name='Value', description='The value of the metric.', example='441'),
      }(name='PartitionNum', description='The number of partitions.'),
      smallFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='"“'),
        value?: long(name='Value', description='The value of the metric.', example='18'),
      }(name='SmallFileCount', description='The number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='SmallFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='18'),
      }(name='SmallFileDayGrowthCount', description='The daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      smallFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of small files'),
        name?: string(name='Name', description='The name of the metric.', example='smallFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.04'),
      }(name='SmallFileRatio', description='The proportion of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
      tinyFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='451'),
      }(name='TinyFileCount', description='The number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.04'),
      }(name='TinyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='482'),
      }(name='TinyFileDayGrowthCount', description='The daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      tinyFileRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of tiny files'),
        name?: string(name='Name', description='The name of the metric.', example='tinyFileRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.96'),
      }(name='TinyFileRatio', description='The proportion of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
      totalDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of total data'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='33800296'),
      }(name='TotalDataDayGrowthSize', description='The daily incremental of the total data volume.'),
      totalDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='33800296'),
      }(name='TotalDataSize', description='The total amount of data.'),
      totalDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total data size'),
        name?: string(name='Name', description='The name of the metric.', example='totalDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='TotalDataSizeDayGrowthRatio', description='The day-to-day growth rate of the total data volume.'),
      totalFileCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: long(name='Value', description='The value of the metric.', example='123'),
      }(name='TotalFileCount', description='The total number of files.'),
      totalFileCountDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileCountDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='TotalFileCountDayGrowthRatio', description='The day-to-day growth rate of the total number of files.'),
      totalFileDayGrowthCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth count of total files'),
        name?: string(name='Name', description='The name of the metric.', example='totalFileDayGrowthCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='100'),
      }(name='TotalFileDayGrowthCount', description='The daily increment of the total number of files.'),
      warmDataDayGrowthSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth size of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataDayGrowthSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='149841'),
      }(name='WarmDataDayGrowthSize', description='The daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
      warmDataRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Ratio of warm data'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: float(name='Value', description='The value of the metric.', example='0.1'),
      }(name='WarmDataRatio', description='The proportion of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
      warmDataSize?: {
        description?: string(name='Description', description='The description of the metric.', example='Size of the warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
        value?: long(name='Value', description='The value of the metric.', example='14981'),
      }(name='WarmDataSize', description='The amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
      warmDataSizeDayGrowthRatio?: {
        description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of warm data size'),
        name?: string(name='Name', description='The name of the metric.', example='warmDataSizeDayGrowthRatio'),
        unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
        value?: float(name='Value', description='The value of the metric.', example='0.01'),
      }(name='WarmDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
    }(name='Metrics', description='The metric information.'),
    owner?: string(name='Owner', description='The owner.', example='DW'),
  }(name='Data', description='The analysis results of the Hive table.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorHiveTableResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorHiveTableResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of a specific Hive table in a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description get Doctor Hive Table
 *
 * @param request GetDoctorHiveTableRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorHiveTableResponse
 */
async function getDoctorHiveTableWithOptions(request: GetDoctorHiveTableRequest, runtime: Util.RuntimeOptions): GetDoctorHiveTableResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.tableName)) {
    query['TableName'] = request.tableName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorHiveTable',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of a specific Hive table in a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description get Doctor Hive Table
 *
 * @param request GetDoctorHiveTableRequest
 * @return GetDoctorHiveTableResponse
 */
async function getDoctorHiveTable(request: GetDoctorHiveTableRequest): GetDoctorHiveTableResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorHiveTableWithOptions(request, runtime);
}

model GetDoctorJobRequest {
  appId?: string(name='AppId', description='The ID of the job that is submitted to YARN.

This parameter is required.', example='application_1542620905989_****'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorJobResponseBody = {
  data?: {
    appId?: string(name='AppId', description='The ID of the job that was submitted to YARN.', example='application_1542620905989_****'),
    appName?: string(name='AppName', description='The name of the job.', example='CREATE TABLE test...ranks=1 (Stage-1)'),
    elapsedTime?: long(name='ElapsedTime', description='The total running time of the job. Unit: milliseconds.', example='278'),
    finalStatus?: string(name='FinalStatus', description='The final state of the job. Valid values:

*   SUCCEEDED
*   FAILED
*   KILLED
*   ENDED
*   UNDEFINED', example='KILLED'),
    finishTime?: long(name='FinishTime', description='The time when the job ended. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1658388322000'),
    launchTime?: long(name='LaunchTime', description='The time when the job was started. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1665014400000'),
    metrics?: {
      memSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total memory usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='memSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='12312312'),
      }(name='MemSeconds', description='The amount of memory consumed.'),
      vcoreSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total vcore usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='vcoreSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='VCores * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='11123'),
      }(name='VcoreSeconds', description='The CPU usage.'),
    }(name='Metrics', description='The data about metrics.'),
    queue?: string(name='Queue', description='The YARN queue to which the job was submitted.', example='DW'),
    startTime?: long(name='StartTime', description='The time when the job was submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1673946000000'),
    state?: string(name='State', description='The running state of the job. Valid values:

*   FINISHED
*   FAILED
*   KILLED', example='FINISHED'),
    type?: string(name='Type', description='The type of the compute engine.', example='SPARK'),
    user?: string(name='User', description='The username that was used to submit the job.', example='DW'),
  }(name='Data', description='The information about the job.'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorJobResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorJobResponseBody(name='body'),
}

/**
 * @summary Obtains the basic running information about a job on E-MapReduce (EMR) Doctor.
 *
 * @description Get realtime job by yarn
 *
 * @param request GetDoctorJobRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorJobResponse
 */
async function getDoctorJobWithOptions(request: GetDoctorJobRequest, runtime: Util.RuntimeOptions): GetDoctorJobResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorJob',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the basic running information about a job on E-MapReduce (EMR) Doctor.
 *
 * @description Get realtime job by yarn
 *
 * @param request GetDoctorJobRequest
 * @return GetDoctorJobResponse
 */
async function getDoctorJob(request: GetDoctorJobRequest): GetDoctorJobResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorJobWithOptions(request, runtime);
}

model GetDoctorReportComponentSummaryRequest {
  clusterId?: string(name='ClusterId', description='Cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  componentType?: string(name='ComponentType', description='Select component filter type. Values: 
- compute 
- hive
- hdfs
- yarn
- oss
- hbase

This parameter is required.', example='compute'),
  dateTime?: string(name='DateTime', description='Report date.

This parameter is required.', example='2023-01-01'),
  regionId?: string(name='RegionId', description='Region ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetDoctorReportComponentSummaryResponseBody = {
  data?: {
    score?: int32(name='Score', description='Score.', example='88'),
    suggestion?: string(name='Suggestion', description='Optimization suggestions.', example='计算健康度分数为 88 ，集群处于健康状态，继续保持 
计算任务扫描
对集群中 1518 个计算任务进行了扫描，包含 209 个任务处于不健康状态 ，596 个任务处于亚健康状态 ，713 个任务处于健康状态。 
其中：
       Tez 任务 1518 个，加权平均分为 88 ，内存使用量占整体集群的 100.0% ，CPU 使用量占整体集群的 100.0% ，其中 209 个任务处于不健康状态，596 个任务处于亚健康状态；
可在下面的任务明细列表中点击\\\\"\\\\"查看详情\\\\"\\\\"，查看存在的具体问题及解决方案。其中\\\\"\\\\"低分任务算力内存时 (GB*Sec)Top20 \\\\"\\\\"表根据内存时使用量进行排序，由于大任务对集群整体影响可能更大，建议优先关注。
内存利用率较低
集群整体内存利用率为 47.8% ，内存利用率较低，计算资源存在浪费，建议优先对内存算力时较大且内存利用率较低的 TOP 任务进行优化
其中，Tez作业平均内存利用率为 47.8%'),
    summary?: string(name='Summary', description='Report summary.', example='<h4> [计算检测]  计算健康度分数为 88 ，健康度良好，继续加油 </h4><p style=\\\\"\\\\"text-indent：2em\\\\"\\\\">集群中大部分任务保持健康状态 </p><p style=\\\\"\\\\"text-indent：2em\\\\"\\\\">集群内存利用率为： 47.8% 偏低 </p>'),
  }(name='Data', description='Report content.'),
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetDoctorReportComponentSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetDoctorReportComponentSummaryResponseBody(name='body'),
}

/**
 * @summary Obtain the analysis result report of a specified component from EMR Doctor.
 *
 * @description get specify component\\"s report analysis by EMR Doctor
 *
 * @param request GetDoctorReportComponentSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetDoctorReportComponentSummaryResponse
 */
async function getDoctorReportComponentSummaryWithOptions(request: GetDoctorReportComponentSummaryRequest, runtime: Util.RuntimeOptions): GetDoctorReportComponentSummaryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentType)) {
    query['ComponentType'] = request.componentType;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetDoctorReportComponentSummary',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtain the analysis result report of a specified component from EMR Doctor.
 *
 * @description get specify component\\"s report analysis by EMR Doctor
 *
 * @param request GetDoctorReportComponentSummaryRequest
 * @return GetDoctorReportComponentSummaryResponse
 */
async function getDoctorReportComponentSummary(request: GetDoctorReportComponentSummaryRequest): GetDoctorReportComponentSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return getDoctorReportComponentSummaryWithOptions(request, runtime);
}

model GetNodeGroupRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='c-b933c5aac8fe****'),
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.

This parameter is required.', example='ng-869471354ecd****'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
}

model GetNodeGroupResponseBody = {
  nodeGroup?: NodeGroup(name='NodeGroup', description='The node group.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model GetNodeGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetNodeGroupResponseBody(name='body'),
}

/**
 * @summary You can call this operation to obtain the details of a node group.
 *
 * @description 获取节点组详情。
 *
 * @param request GetNodeGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetNodeGroupResponse
 */
async function getNodeGroupWithOptions(request: GetNodeGroupRequest, runtime: Util.RuntimeOptions): GetNodeGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetNodeGroup',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary You can call this operation to obtain the details of a node group.
 *
 * @description 获取节点组详情。
 *
 * @param request GetNodeGroupRequest
 * @return GetNodeGroupResponse
 */
async function getNodeGroup(request: GetNodeGroupRequest): GetNodeGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return getNodeGroupWithOptions(request, runtime);
}

model GetOperationRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster that you want to query.

This parameter is required.', example='c-b933c5aac8fe****'),
  operationId?: string(name='OperationId', description='The operation ID.

References:

*   [CreateCluster](https://help.aliyun.com/document_detail/454393.html)
*   [IncreaseNodes](https://help.aliyun.com/document_detail/454397.html)

This parameter is required.', example='op-13c37a77c505****'),
  regionId?: string(name='RegionId', description='The district ID.

This parameter is required.', example='cn-hangzhou'),
}

model GetOperationResponseBody = {
  operation?: Operation(name='Operation', description='The operation that was performed.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3896A'),
}

model GetOperationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOperationResponseBody(name='body'),
}

/**
 * @summary Gets the details of an asynchronous operation.
 *
 * @param request GetOperationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOperationResponse
 */
async function getOperationWithOptions(request: GetOperationRequest, runtime: Util.RuntimeOptions): GetOperationResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.operationId)) {
    query['OperationId'] = request.operationId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetOperation',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Gets the details of an asynchronous operation.
 *
 * @param request GetOperationRequest
 * @return GetOperationResponse
 */
async function getOperation(request: GetOperationRequest): GetOperationResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOperationWithOptions(request, runtime);
}

model IncreaseNodesRequest {
  applicationConfigs?: [
    ApplicationConfig
  ](name='ApplicationConfigs', description='The application configurations. You can specify a maximum of 1,000 items.', example='Month'),
  autoPayOrder?: boolean(name='AutoPayOrder', description='Indicates whether to automatically pay for the orders involved in the scale-out operation. This parameter takes effect only when the PaymentType parameter is set to Subscription. Valid values:

*   true: automatically pays for the order involved in this operation.
*   false: does not automatically pay for the orders involved in this operation.

Default value: false', example='false'),
  autoRenew?: boolean(name='AutoRenew', description='Specifies whether to enable auto-renewal for nodes. Valid values:

*   true
*   false (default value)', example='false'),
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='c-b933c5aac8fe****'),
  increaseNodeCount?: int32(name='IncreaseNodeCount', description='The number of nodes. The number of incremental nodes for this scale-out. Valid values: 1 to 500.

This parameter is required.', example='3'),
  minIncreaseNodeCount?: int32(name='MinIncreaseNodeCount', description='The minimum number of nodes that can be added. Valid values: 1 to 500.

*   If you configure this parameter, and the number of available Elastic Compute Service (ECS) instances is less than the value of the IncreaseNodeCount parameter, the system tries to add nodes based on the number specified by the `MinIncreaseNodeCount` parameter. If the minimum number of nodes are added, the scale-out status is `PARTIAL_COMPLETED`.
*   If you do not configure this parameter, and the number of available ECS instances is less than the value of the IncreaseNodeCount parameter, the scale-out process fails. The scale-out status is `FAILED`.'),
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group. The target node group to which you want to scale out the cluster.

This parameter is required.', example='ng-869471354ecd****'),
  paymentDuration?: int32(name='PaymentDuration', description='The subscription duration. Valid values when the PaymentDurationUnit value is Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.', example='12'),
  paymentDurationUnit?: string(name='PaymentDurationUnit', description='The unit of the subscription duration. Valid values:

*   Month', example='Month'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
}

model IncreaseNodesResponseBody = {
  operationId?: string(name='OperationId', description='The ID of the operation.', example='op-13c37a77c505****'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model IncreaseNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: IncreaseNodesResponseBody(name='body'),
}

/**
 * @summary Scale out the node group.
 *
 * @param request IncreaseNodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return IncreaseNodesResponse
 */
async function increaseNodesWithOptions(request: IncreaseNodesRequest, runtime: Util.RuntimeOptions): IncreaseNodesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationConfigs)) {
    query['ApplicationConfigs'] = request.applicationConfigs;
  }
  if (!Util.isUnset(request.autoPayOrder)) {
    query['AutoPayOrder'] = request.autoPayOrder;
  }
  if (!Util.isUnset(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.increaseNodeCount)) {
    query['IncreaseNodeCount'] = request.increaseNodeCount;
  }
  if (!Util.isUnset(request.minIncreaseNodeCount)) {
    query['MinIncreaseNodeCount'] = request.minIncreaseNodeCount;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.paymentDuration)) {
    query['PaymentDuration'] = request.paymentDuration;
  }
  if (!Util.isUnset(request.paymentDurationUnit)) {
    query['PaymentDurationUnit'] = request.paymentDurationUnit;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'IncreaseNodes',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Scale out the node group.
 *
 * @param request IncreaseNodesRequest
 * @return IncreaseNodesResponse
 */
async function increaseNodes(request: IncreaseNodesRequest): IncreaseNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  return increaseNodesWithOptions(request, runtime);
}

model JoinResourceGroupRequest {
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.

This parameter is required.', example='rg-acfmzabjyop****'),
  resourceId?: string(name='ResourceId', description='The ID of the resource.

This parameter is required.', example='c-c95f0a39d8ff****'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Valid values:

*   cluster: cluster

This parameter is required.', example='cluster'),
}

model JoinResourceGroupResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3****'),
}

model JoinResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: JoinResourceGroupResponseBody(name='body'),
}

/**
 * @summary Add an EMR resource to the target resource group. A resource can belong to only one resource group.
 *
 * @param request JoinResourceGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return JoinResourceGroupResponse
 */
async function joinResourceGroupWithOptions(request: JoinResourceGroupRequest, runtime: Util.RuntimeOptions): JoinResourceGroupResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.resourceId)) {
    query['ResourceId'] = request.resourceId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'JoinResourceGroup',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Add an EMR resource to the target resource group. A resource can belong to only one resource group.
 *
 * @param request JoinResourceGroupRequest
 * @return JoinResourceGroupResponse
 */
async function joinResourceGroup(request: JoinResourceGroupRequest): JoinResourceGroupResponse {
  var runtime = new Util.RuntimeOptions{};
  return joinResourceGroupWithOptions(request, runtime);
}

model ListApiTemplatesRequest {
  apiName?: string(name='ApiName', description='接口名。

This parameter is required.', example='CreateCluster'),
  maxResults?: int32(name='MaxResults', description='一次获取的最大记录数。', example='20'),
  nextToken?: string(name='NextToken', description='标记当前开始读取的位置，置空表示从头开始。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  regionId?: string(name='RegionId', description='区域ID。

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='资源组ID。', example='rg-acfmzabjyop****'),
  templateId?: string(name='TemplateId', description='集群模板id。', example='at-41b4c6a0fc63****'),
  templateIds?: [ string ](name='TemplateIds', description='集群模板id列表。', example='["AT-****"]'),
  templateName?: string(name='TemplateName', description='集群模板名字。', example='DATALAKE模板'),
}

model ListApiTemplatesResponseBody = {
  apiTemplates?: [
    ApiTemplate
  ](name='ApiTemplates', description='The API operation templates.', deprecated=true),
  maxResults?: int32(name='MaxResults', description='本次请求所返回的最大记录条数。', example='20'),
  nextToken?: string(name='NextToken', description='返回读取到的数据位置，空代表数据已经读取完毕。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='本次请求条件下的数据总量。', example='200'),
}

model ListApiTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApiTemplatesResponseBody(name='body'),
}

/**
 * @summary 查询API模板
 *
 * @param request ListApiTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApiTemplatesResponse
 */
async function listApiTemplatesWithOptions(request: ListApiTemplatesRequest, runtime: Util.RuntimeOptions): ListApiTemplatesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.templateIds)) {
    query['TemplateIds'] = request.templateIds;
  }
  if (!Util.isUnset(request.templateName)) {
    query['TemplateName'] = request.templateName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApiTemplates',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询API模板
 *
 * @param request ListApiTemplatesRequest
 * @return ListApiTemplatesResponse
 */
async function listApiTemplates(request: ListApiTemplatesRequest): ListApiTemplatesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApiTemplatesWithOptions(request, runtime);
}

model ListApplicationConfigsRequest {
  applicationName?: string(name='ApplicationName', description='The name of the application.', example='HDFS'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-e6a9d46e9267****'),
  configFileName?: string(name='ConfigFileName', description='The name of the configuration file.', example='hdfs-site.xml'),
  configItemKey?: string(name='ConfigItemKey', description='The name of the configuration item.', example='dfs.replication'),
  configItemValue?: string(name='ConfigItemValue', description='The value of the configuration item.', example='2'),
  maxResults?: int32(name='MaxResults', description='The number of entries per page.', example='100'),
  nextToken?: string(name='NextToken', description='The page number of the next page returned.', example='1'),
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.', example='ng-d555335ced5c****'),
  nodeId?: string(name='NodeId', description='The node ID.', example='i-bp10h9rezawz1i4o****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model ListApplicationConfigsResponseBody = {
  applicationConfigs?: [ 
    {
      applicationName?: string(name='ApplicationName', description='The name of the application.', example='HDFS'),
      configEffectState?: string(name='ConfigEffectState', description='The status of the configuration value.', example='EFFECT'),
      configFileName?: string(name='ConfigFileName', description='The name of the configuration file.', example='hdfs-site.xml'),
      configItemKey?: string(name='ConfigItemKey', description='The key of the configuration item.', example='dfs.replication'),
      configItemValue?: string(name='ConfigItemValue', description='The value of the configuration item.', example='2'),
      createTime?: long(name='CreateTime', description='The creation time.', example='1628589439114'),
      custom?: boolean(name='Custom', description='Indicates whether the configurations are custom.', example='false'),
      description?: string(name='Description', description='The description.', example='dfs.replication description'),
      initValue?: string(name='InitValue', description='The initial value.', example='2'),
      modifier?: string(name='Modifier', description='The person who modified the configurations.', example='170906468757****'),
      nodeGroupId?: string(name='NodeGroupId', description='The node group ID.', example='ng-d555335ced5****'),
      nodeId?: string(name='NodeId', description='The node ID.', example='i-bp18y0ng3qqxog4mw****'),
      updateTime?: long(name='UpdateTime', description='The update time.', example='1628589439114'),
    }
  ](name='ApplicationConfigs', description='The application configurations.'),
  maxResults?: int32(name='MaxResults', description='The number of entries per page.', example='100'),
  nextToken?: string(name='NextToken', description='The page number of the next page returned.', example='1'),
  requestId?: string(name='RequestId', description='The request ID.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3****'),
  totalCount?: int32(name='TotalCount', description='The total number of pages returned.', example='100'),
}

model ListApplicationConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApplicationConfigsResponseBody(name='body'),
}

/**
 * @description 查询应用配置。
 *
 * @param request ListApplicationConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApplicationConfigsResponse
 */
async function listApplicationConfigsWithOptions(request: ListApplicationConfigsRequest, runtime: Util.RuntimeOptions): ListApplicationConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationName)) {
    query['ApplicationName'] = request.applicationName;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.configFileName)) {
    query['ConfigFileName'] = request.configFileName;
  }
  if (!Util.isUnset(request.configItemKey)) {
    query['ConfigItemKey'] = request.configItemKey;
  }
  if (!Util.isUnset(request.configItemValue)) {
    query['ConfigItemValue'] = request.configItemValue;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.nodeId)) {
    query['NodeId'] = request.nodeId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApplicationConfigs',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @description 查询应用配置。
 *
 * @param request ListApplicationConfigsRequest
 * @return ListApplicationConfigsResponse
 */
async function listApplicationConfigs(request: ListApplicationConfigsRequest): ListApplicationConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApplicationConfigsWithOptions(request, runtime);
}

model ListApplicationsRequest {
  applicationNames?: [ string ](name='ApplicationNames', description='The application names.', example='c-b933c5aac8fe****'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-e6a9d46e92675****'),
  maxResults?: int32(name='MaxResults', description='The total number of pages.', example='10'),
  nextToken?: string(name='NextToken', description='The page number of the next page returned.', example='0'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model ListApplicationsResponseBody = {
  applications?: [ 
    {
      applicationName?: string(name='ApplicationName', description='The application name.', example='HDFS'),
      applicationState?: string(name='ApplicationState', description='The status of the applications. Valid values:

*   STOPPED: At least one application is in the Stopped state.
*   RUNNING: All applications are in the Running state.

This parameter is returned only for DataLake, OLAP, Dataflow, DataServing, and custom clusters. For other types of clusters, no value is returned for this parameter.', example='RUNNING'),
      applicationVersion?: string(name='ApplicationVersion', description='The version of the application.', example='2.8.1', deprecated=true),
      communityVersion?: string(name='CommunityVersion', description='The community edition.', example='2.8.5'),
    }
  ](name='Applications', description='The applications.'),
  maxResults?: int32(name='MaxResults', description='The number of entries per page.', example='10'),
  nextToken?: string(name='NextToken', description='The page number of the next page returned.', example='2'),
  requestId?: string(name='RequestId', description='The request ID.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3****'),
  totalCount?: int32(name='TotalCount', description='The total number of pages.', example='20'),
}

model ListApplicationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListApplicationsResponseBody(name='body'),
}

/**
 * @param request ListApplicationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListApplicationsResponse
 */
async function listApplicationsWithOptions(request: ListApplicationsRequest, runtime: Util.RuntimeOptions): ListApplicationsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationNames)) {
    query['ApplicationNames'] = request.applicationNames;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListApplications',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListApplicationsRequest
 * @return ListApplicationsResponse
 */
async function listApplications(request: ListApplicationsRequest): ListApplicationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listApplicationsWithOptions(request, runtime);
}

model ListAutoScalingActivitiesRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  endTime?: long(name='EndTime', description='The end of the time range to query. Unit: milliseconds.', example='1639718634819'),
  maxResults?: int32(name='MaxResults', description='The number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.', example='ng-869471354ecd****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  scalingActivityStates?: [ string ](name='ScalingActivityStates', description='The status of the scaling activity. Number of elements in the array: 1-20.', example='["REJECTED","SUCCESSFUL"]'),
  scalingActivityType?: string(name='ScalingActivityType', description='The type of the scaling activity. Valid values:

*   SCALE_OUT
*   SCALE_IN', example='SCALE_IN'),
  scalingPolicyType?: string(name='ScalingPolicyType'),
  scalingRuleName?: string(name='ScalingRuleName', description='The name of the scaling rule.', example='scale-out-by-memroy'),
  startTime?: long(name='StartTime', description='The beginning of the time range to query. Unit: milliseconds.', example='1639714634819'),
}

model ListAutoScalingActivitiesResponseBody = {
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  scalingActivities?: [ 
    {
      activityId?: string(name='ActivityId', description='The ID of the scaling activity.', example='asa-36373b084d6b4b13aa50f4129a9e****'),
      activityState?: string(name='ActivityState', description='The status of the scaling activity. Valid values:

*   REJECTED
*   SUCCESSFUL
*   FAILED
*   IN_PROGRESS', example='IN_PROGRESS'),
      activityType?: string(name='ActivityType', description='The type of the scaling activity. Valid values:

*   SCALE_OUT
*   SCALE_IN', example='SCALE_OUT'),
      clusterId?: string(name='ClusterId', description='The cluster ID.', example='c-b933c5aac8fe****'),
      description?: string(name='Description', description='The description of the scaling activity.', example='clusterId not exist'),
      endTime?: long(name='EndTime', description='The end time of the scaling. Unit: milliseconds.', example='1639715634819'),
      expectNum?: int32(name='ExpectNum', description='The number of added or removed instances.', example='10'),
      instanceTypeToNum?: map[string]int32(name='InstanceTypeToNum'),
      nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.', example='ng-869471354ecd****'),
      nodeGroupName?: string(name='NodeGroupName', description='The name of the node group.', example='task-01'),
      operationId?: string(name='OperationId', description='The operation ID.', example='op-13c37a77c505****'),
      policyType?: string(name='PolicyType'),
      ruleName?: string(name='RuleName', description='The name of the scaling rule.', example='scaling-out-memory'),
      startTime?: long(name='StartTime', description='The start time of the scaling. Unit: milliseconds.', example='1639714634819'),
    }
  ](name='ScalingActivities', description='The scaling activities.'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListAutoScalingActivitiesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAutoScalingActivitiesResponseBody(name='body'),
}

/**
 * @summary 查询弹性伸缩活动列表。
 *
 * @param request ListAutoScalingActivitiesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAutoScalingActivitiesResponse
 */
async function listAutoScalingActivitiesWithOptions(request: ListAutoScalingActivitiesRequest, runtime: Util.RuntimeOptions): ListAutoScalingActivitiesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scalingActivityStates)) {
    query['ScalingActivityStates'] = request.scalingActivityStates;
  }
  if (!Util.isUnset(request.scalingActivityType)) {
    query['ScalingActivityType'] = request.scalingActivityType;
  }
  if (!Util.isUnset(request.scalingPolicyType)) {
    query['ScalingPolicyType'] = request.scalingPolicyType;
  }
  if (!Util.isUnset(request.scalingRuleName)) {
    query['ScalingRuleName'] = request.scalingRuleName;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAutoScalingActivities',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询弹性伸缩活动列表。
 *
 * @param request ListAutoScalingActivitiesRequest
 * @return ListAutoScalingActivitiesResponse
 */
async function listAutoScalingActivities(request: ListAutoScalingActivitiesRequest): ListAutoScalingActivitiesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAutoScalingActivitiesWithOptions(request, runtime);
}

model ListClustersRequest {
  clusterIds?: [ string ](name='ClusterIds', description='The IDs of the clusters. You can specify a maximum of 100 items.', example='rg-acfmzabjyop****'),
  clusterName?: string(name='ClusterName', description='The name of the cluster.', example='emrtest'),
  clusterStates?: [ string ](name='ClusterStates', description='The states of clusters. You can specify a maximum of 100 items.', example='["HADOOP"]'),
  clusterTypes?: [ string ](name='ClusterTypes', description='The types of the clusters. You can specify a maximum of 100 items.', example='["c-b933c5aac8fe****"]'),
  maxResults?: int32(name='MaxResults', description='The number of entries to return on each page. Valid values: 1 to 100.', example='20'),
  nextToken?: string(name='NextToken', description='The starting point of the current query. If you do not configure this parameter, the query starts from the beginning.', example='eyJlY21OZXh0VG9rZW4iOiIxIiwidGFpaGFvTmV4dFRva2VuIjoiNTYiLCJ0YWloYW9OZXh0VG9rZW5JbnQiOjU2LCJlY21OZXh0VG9rZW5JbnQiOjF9'),
  paymentTypes?: [ string ](name='PaymentTypes', description='The billing methods. You can specify a maximum of 2 items.', example='["ECS"]'),
  regionId?: string(name='RegionId', description='The region ID.

Valid values:

*   cn-qingdao
*   cn-beijing
*   cn-zhangjiakou
*   cn-huhehaote
*   cn-hangzhou
*   cn-shanghai
*   cn-shenzhen
*   cn-chengdu
*   cn-hongkong
*   cn-wulanchabu
*   cn-heyuan-acdr-1
*   cn-qingdao-acdr-ut-1
*   ap-northeast-1
*   ap-southeast-1
*   ap-southeast-2
*   ap-southeast-3
*   ap-southeast-5
*   ap-south-1
*   us-east-1
*   us-west-1
*   me-east-1
*   me-central-1
*   eu-central-1
*   eu-west-1
*   cn-north-2-gov-1

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-acfmzabjyop****'),
  tags?: [
    Tag
  ](name='Tags', description='The tags. Number of elements in the array: 1 to 20.', example='["PayAsYouGo"]'),
}

model ListClustersResponseBody = {
  clusters?: [
    ClusterSummary
  ](name='Clusters', description='The clusters.'),
  maxResults?: int32(name='MaxResults', description='The number of entries returned per page.', example='20'),
  nextToken?: string(name='NextToken', description='The page number of the next page returned.', example='eyJlY21OZXh0VG9rZW4iOiIxIiwidGFpaGFvTmV4dFRva2VuIjoiNTYiLCJ0YWloYW9OZXh0VG9rZW5JbnQiOjU2LCJlY21OZXh0VG9rZW5JbnQiOjF9'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3896A'),
  totalCount?: int32(name='TotalCount', description='The total number of pages.', example='1000'),
}

model ListClustersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListClustersResponseBody(name='body'),
}

/**
 * @summary Queries E-MapReduce (EMR) clusters.
 *
 * @param request ListClustersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListClustersResponse
 */
async function listClustersWithOptions(request: ListClustersRequest, runtime: Util.RuntimeOptions): ListClustersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterIds)) {
    query['ClusterIds'] = request.clusterIds;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.clusterStates)) {
    query['ClusterStates'] = request.clusterStates;
  }
  if (!Util.isUnset(request.clusterTypes)) {
    query['ClusterTypes'] = request.clusterTypes;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.paymentTypes)) {
    query['PaymentTypes'] = request.paymentTypes;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListClusters',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries E-MapReduce (EMR) clusters.
 *
 * @param request ListClustersRequest
 * @return ListClustersResponse
 */
async function listClusters(request: ListClustersRequest): ListClustersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listClustersWithOptions(request, runtime);
}

model ListComponentInstancesRequest {
  applicationNames?: [ string ](name='ApplicationNames', description='应用名称列表。', example='["HDFS"]'),
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  componentNames?: [ string ](name='ComponentNames', description='组件名称列表。', example='["DataNode"]'),
  componentStates?: [ string ](name='ComponentStates', example='null'),
  maxResults?: int32(name='MaxResults', description='一次获取的最大记录数。取值范围：1~100。', example='20'),
  nextToken?: string(name='NextToken', description='标记当前开始读取的位置，置空表示从头开始。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodeIds?: [ string ](name='NodeIds', description='节点ID列表。', example='["i-bp1cudc25w2bfwl5****"]'),
  nodeNames?: [ string ](name='NodeNames', description='节点名称列表。', example='["core1-1"]'),
  regionId?: string(name='RegionId', description='地域ID。

This parameter is required.', example='cn-hangzhou'),
}

model ListComponentInstancesResponseBody = {
  componentInstances?: [ 
    {
      applicationName?: string(name='ApplicationName', description='应用名称。', example='HDFS'),
      bizState?: string(name='BizState', description='组件服务状态，取值如下：
- active：主服务
- standby：备用服务。', example='active'),
      commissionState?: string(name='CommissionState', description='Commission状态，取值如下：
- COMMISSIONED：已上线
- COMMISSIONING：上线中
- DECOMMISSIONED：已下线
- DECOMMISSIONINPROGRESS：下线进程中
- DECOMMISSIONFAILED：下线失败
- INSERVICE：服务中
- UNKNOWN：未知状态。
<p>', example='INSERVICE'),
      componentInstanceState?: string(name='ComponentInstanceState', description='组件实例操作状态，取值如下：
- WAITING：等待中
- INSTALLING：安装中
- INSTALLED：已安装
- INSTALL_FAILED：安装失败
- STARTING：启动中
- STARTED：已启动
- START_FAILED：启动失败
- STOPPING：停止中
- STOPPED：已停止
- STOP_FAILED：停止失败'),
      componentName?: string(name='ComponentName', description='组件名称。', example='DataNode'),
      createTime?: long(name='CreateTime', description='安装时间戳。', example='1628248947000'),
      desiredState?: string(name='DesiredState', description='期望状态，取值如下：
- WAITING：等待中
- INSTALLING：安装中
- INSTALLED：已安装
- INSTALL_FAILED：安装失败
- STARTING：启动中
- STARTED：已启动
- START_FAILED：启动失败
- STOPPING：停止中
- STOPPED：已停止
- STOP_FAILED：停止失败。', example='STARTED'),
      nodeId?: string(name='NodeId', description='节点ID。', example='i-bp1cudc25w2bfwl5****'),
      nodeName?: string(name='NodeName', description='节点名称。', example='core1-1'),
    }
  ](name='ComponentInstances'),
  maxResults?: int32(name='MaxResults', description='本次请求所返回的最大记录条数。', example='20'),
  nextToken?: string(name='NextToken', description='返回读取到的数据位置，空代表数据已经读取完毕。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='本次请求条件下的数据总量。', example='200'),
}

model ListComponentInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListComponentInstancesResponseBody(name='body'),
}

/**
 * @description 查询组件实例列表。
 *
 * @param request ListComponentInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListComponentInstancesResponse
 */
async function listComponentInstancesWithOptions(request: ListComponentInstancesRequest, runtime: Util.RuntimeOptions): ListComponentInstancesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationNames)) {
    query['ApplicationNames'] = request.applicationNames;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentNames)) {
    query['ComponentNames'] = request.componentNames;
  }
  if (!Util.isUnset(request.componentStates)) {
    query['ComponentStates'] = request.componentStates;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.nodeIds)) {
    query['NodeIds'] = request.nodeIds;
  }
  if (!Util.isUnset(request.nodeNames)) {
    query['NodeNames'] = request.nodeNames;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListComponentInstances',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @description 查询组件实例列表。
 *
 * @param request ListComponentInstancesRequest
 * @return ListComponentInstancesResponse
 */
async function listComponentInstances(request: ListComponentInstancesRequest): ListComponentInstancesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listComponentInstancesWithOptions(request, runtime);
}

model ListComponentsRequest {
  applicationNames?: [ string ](name='ApplicationNames', description='应用名称列表。', example='["HDFS"]'),
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  componentNames?: [ string ](name='ComponentNames', description='组件名称列表。', example='["DataNode"]'),
  componentStates?: [ string ](name='ComponentStates', example='null'),
  maxResults?: int32(name='MaxResults', description='一次获取的最大记录数。取值范围：1~100。', example='20'),
  nextToken?: string(name='NextToken', description='标记当前开始读取的位置，置空表示从头开始。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  regionId?: string(name='RegionId', description='地域ID。

This parameter is required.', example='cn-hangzhou'),
}

model ListComponentsResponseBody = {
  components?: [ 
    {
      applicationName?: string(name='ApplicationName', description='应用名称。', example='HDFS'),
      attributes?: [
        Attribute
      ](name='Attributes', description='属性列表。'),
      componentName?: string(name='ComponentName', description='组件名称。', example='DataNode'),
      namespace?: string(name='Namespace', description='命名空间。'),
      replica?: int32(name='Replica', description='安装该组件的机器总数。', example='1'),
    }
  ](name='Components'),
  maxResults?: int32(name='MaxResults', description='本次请求所返回的最大记录条数。', example='20'),
  nextToken?: string(name='NextToken', description='返回读取到的数据位置，空代表数据已经读取完毕。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='本次请求条件下的数据总量。', example='200'),
}

model ListComponentsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListComponentsResponseBody(name='body'),
}

/**
 * @param request ListComponentsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListComponentsResponse
 */
async function listComponentsWithOptions(request: ListComponentsRequest, runtime: Util.RuntimeOptions): ListComponentsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationNames)) {
    query['ApplicationNames'] = request.applicationNames;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentNames)) {
    query['ComponentNames'] = request.componentNames;
  }
  if (!Util.isUnset(request.componentStates)) {
    query['ComponentStates'] = request.componentStates;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListComponents',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListComponentsRequest
 * @return ListComponentsResponse
 */
async function listComponents(request: ListComponentsRequest): ListComponentsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listComponentsWithOptions(request, runtime);
}

model ListDoctorApplicationsRequest {
  appIds?: [ string ](name='AppIds', description='The IDs of jobs that are submitted to YARN.', example='null'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The field that you use to sort the query results. Valid values:

1.  startTime: the time when the job starts
2.  endTime: the time when the job ends
3.  vcoreUtilization: the vCPU utilization of the job
4.  memUtilization: the memory usage of the job
5.  vcoreSeconds: the aggregated number of vCPUs that are allocated to the job multiplied by the number of seconds the job has been running
6.  memSeconds: the aggregated amount of memory that is allocated to the job multiplied by the number of seconds the job has been running
7.  score: the score of the job', example='score'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid values:

*   ASC: the ascending order
*   DESC: the descending order', example='ASC'),
  queues?: [ string ](name='Queues', description='The YARN queues to which the jobs are submitted.', example='null'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  types?: [ string ](name='Types', description='The YARN engines to which the jobs are submitted.', example='null'),
  users?: [ string ](name='Users', description='The users who submit the jobs.', example='null'),
}

model ListDoctorApplicationsResponseBody = {
  data?: [ 
    {
      analysis?: {
        score?: int32(name='Score', description='The score of the job.', example='23'),
        suggestion?: string(name='Suggestion', description='The suggestion on executing the job.'),
      }(name='Analysis', description='The analysis results of the jobs.'),
      appId?: string(name='AppId', description='The job ID in YARN. The value of QueryID or SessionID is returned for a Hive job.', example='application_1665056147236_*****'),
      appName?: string(name='AppName', description='The name of the job.', example='data-upload'),
      endTime?: long(name='EndTime', description='The time when the job ended. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1682049088086'),
      ids?: [ string ](name='Ids', description='The job IDs. Multiple job IDs are separated with commas (,).', example='null'),
      metrics?: {
        memSeconds?: {
          description?: string(name='Description', description='The description of the metric.', example='Total memory usage over time in seconds'),
          name?: string(name='Name', description='The name of the metric.', example='memSeconds'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB * Sec'),
          value?: long(name='Value', description='The value of the metric.', example='12312312'),
        }(name='MemSeconds', description='The amount of memory consumed.'),
        memUtilization?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of used memory to total available memory'),
          name?: string(name='Name', description='The name of the metric.', example='memUtilization'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.23'),
        }(name='MemUtilization', description='The memory usage'),
        vcoreSeconds?: {
          description?: string(name='Description', description='The description of the metric.', example='Total vcore usage over time in seconds'),
          name?: string(name='Name', description='The name of the metric.', example='vcoreSeconds'),
          unit?: string(name='Unit', description='The unit of the metric.', example='VCores * Sec'),
          value?: long(name='Value', description='The value of the metric.', example='11123'),
        }(name='VcoreSeconds', description='The CPU usage.'),
        vcoreUtilization?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of used vcore to total available cores'),
          name?: string(name='Name', description='The name of the metric.', example='vcoreUtilization'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='23.1'),
        }(name='VcoreUtilization', description='The CPU utilization. This parameter has the same meaning as %CPU in the Linux top command.'),
      }(name='Metrics', description='The data about metrics.'),
      querySql?: string(name='QuerySql', description='The query statement. This parameter is left empty for non-SQL jobs.', example='SELECT id, count(1) FROM test group by id;'),
      queue?: string(name='Queue', description='The YARN queue to which the job was submitted.', example='DW'),
      startTime?: long(name='StartTime', description='The time when the job was submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1677465658275'),
      type?: string(name='Type', description='The type of the compute engine.', example='TEZ'),
      user?: string(name='User', description='The username that was used to submit the job.', example='DW'),
    }
  ](name='Data', description='The details of jobs.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorApplicationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorApplicationsResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of multiple jobs on E-MapReduce (EMR) Doctor.
 *
 * @description list all doctor analysis apps
 *
 * @param request ListDoctorApplicationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorApplicationsResponse
 */
async function listDoctorApplicationsWithOptions(request: ListDoctorApplicationsRequest, runtime: Util.RuntimeOptions): ListDoctorApplicationsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.queues)) {
    query['Queues'] = request.queues;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.types)) {
    query['Types'] = request.types;
  }
  if (!Util.isUnset(request.users)) {
    query['Users'] = request.users;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorApplications',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of multiple jobs on E-MapReduce (EMR) Doctor.
 *
 * @description list all doctor analysis apps
 *
 * @param request ListDoctorApplicationsRequest
 * @return ListDoctorApplicationsResponse
 */
async function listDoctorApplications(request: ListDoctorApplicationsRequest): ListDoctorApplicationsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorApplicationsWithOptions(request, runtime);
}

model ListDoctorComputeSummaryRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  componentTypes?: [ string ](name='ComponentTypes', description='The resource types, which are used to filter query results. Valid values:

*   engine: filters results by engine.
*   queue: filters results by queue.
*   cluster: displays the results at the cluster level.

If you do not specify this parameter, the information at the cluster level is displayed by default. Currently, only one resource type is supported. If you specify multiple resource types, the first resource type is used by default.', example='null'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The basis on which you want to sort the query results. Valid values:

1.  vcoreSeconds: the total CPU consumption over time in seconds.
2.  memSeconds: the total memory consumption over time in seconds.
3.  vcoreUtilization: the average CPU utilization. The meaning is the same as the %CPU parameter in the output of the top command in Linux.
4.  memUtilization: the average memory usage.
5.  vcoreSecondsDayGrowthRatio: the day-to-day growth rate of the total CPU consumption over time in seconds.
6.  memSecondsDayGrowthRatio: the day-to-day growth rate of the total memory consumption over time in seconds.
7.  readSize: the total amount of data read from the file system.
8.  writeSize: the total amount of data written to the file system.
9.  healthyJobCount: the total number of healthy jobs.
10. subHealthyJobCount: the total number of sub-healthy jobs.
11. unhealthyJobCount: the total number of unhealthy jobs.
12. needAttentionJobCount: the total number of jobs that require attention.
13. score: the score for jobs.
14. scoreDayGrowthRatio: the day-to-day growth rate of the score for jobs.', example='score'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid values:

*   ASC: in ascending order.
*   DESC: in descending order.', example='ASC'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model ListDoctorComputeSummaryResponseBody = {
  data?: [ 
    {
      analysis?: {
        healthyJobCount?: long(name='HealthyJobCount', description='The total number of healthy jobs.', example='3'),
        needAttentionJobCount?: long(name='NeedAttentionJobCount', description='The total number of jobs that require attention.', example='23'),
        score?: int32(name='Score', description='The score for jobs.', example='56'),
        scoreDayGrowthRatio?: float(name='ScoreDayGrowthRatio', description='The day-to-day growth rate of the score for jobs.', example='0.03'),
        subHealthyJobCount?: long(name='SubHealthyJobCount', description='The total number of sub-healthy jobs.', example='13'),
        unhealthyJobCount?: long(name='UnhealthyJobCount', description='The total number of unhealthy jobs.', example='123'),
      }(name='Analysis', description='The resource analysis results.'),
      componentName?: string(name='ComponentName', description='The name of the resource whose details are obtained based on the value of ComponentTypes. For example, if the value of ComponentTypes is Queue, the value of this parameter is a queue, such as DW.', example='DW'),
      metrics?: {
        memSeconds?: {
          description?: string(name='Description', description='The description of the metric.', example='Total memory usage over time in seconds'),
          name?: string(name='Name', description='The name of the metric.', example='memSeconds'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB * Sec'),
          value?: long(name='Value', description='The value of the metric.', example='12312312'),
        }(name='MemSeconds', description='The total memory consumption over time in seconds.'),
        memSecondsDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Growth ratio of memory usage in seconds per day'),
          name?: string(name='Name', description='The name of the metric.', example='memSecondsDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: float(name='Value', description='The value of the metric.', example='0.36'),
        }(name='MemSecondsDayGrowthRatio', description='The day-to-day growth rate of the total memory consumption over time in seconds.'),
        memUtilization?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of used memory to total available memory'),
          name?: string(name='Name', description='The name of the metric.', example='memUtilization'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: float(name='Value', description='The value of the metric.', example='0.82'),
        }(name='MemUtilization', description='The average memory usage.'),
        readSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Total cumulative size of data read in megabytes (MB)'),
          name?: string(name='Name', description='The name of the metric.', example='readSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='504888659968'),
        }(name='ReadSize', description='The total amount of data read from the file system.'),
        vcoreSeconds?: {
          description?: string(name='Description', description='The description of the metric.', example='Total vcore usage over time in seconds'),
          name?: string(name='Name', description='The name of the metric.', example='vcoreSeconds'),
          unit?: string(name='Unit', description='The unit of the metric.', example='VCores * Sec'),
          value?: long(name='Value', description='The value of the metric.', example='1231412'),
        }(name='VcoreSeconds', description='The total CPU consumption over time in seconds.'),
        vcoreSecondsDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Growth ratio of virtual core usage in seconds per day'),
          name?: string(name='Name', description='The name of the metric.', example='vcoreSecondsDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: float(name='Value', description='The value of the metric.', example='0.22'),
        }(name='VcoreSecondsDayGrowthRatio', description='The day-to-day growth rate of the total CPU consumption over time in seconds.'),
        vcoreUtilization?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of used vcore to total available cores'),
          name?: string(name='Name', description='The name of the metric.', example='vcoreUtilization'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: float(name='Value', description='The value of the metric.', example='32.1'),
        }(name='VcoreUtilization', description='The average CPU utilization. The meaning is the same as the %CPU parameter in the output of the top command in Linux.'),
        writeSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Total cumulative size of data written in megabytes (MB)'),
          name?: string(name='Name', description='The name of the metric.', example='writeSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='6294093393920'),
        }(name='WriteSize', description='The total amount of data written to the file system.'),
      }(name='Metrics', description='The metric information.'),
    }
  ](name='Data', description='The details of resource usage.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries that are returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorComputeSummaryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorComputeSummaryResponseBody(name='body'),
}

/**
 * @summary Obtains the information about resource usage by resource type in a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor analysis result of cluster engine queue view
 *
 * @param request ListDoctorComputeSummaryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorComputeSummaryResponse
 */
async function listDoctorComputeSummaryWithOptions(request: ListDoctorComputeSummaryRequest, runtime: Util.RuntimeOptions): ListDoctorComputeSummaryResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentTypes)) {
    query['ComponentTypes'] = request.componentTypes;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorComputeSummary',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the information about resource usage by resource type in a cluster on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor analysis result of cluster engine queue view
 *
 * @param request ListDoctorComputeSummaryRequest
 * @return ListDoctorComputeSummaryResponse
 */
async function listDoctorComputeSummary(request: ListDoctorComputeSummaryRequest): ListDoctorComputeSummaryResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorComputeSummaryWithOptions(request, runtime);
}

model ListDoctorHBaseRegionServersRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='The query date.

This parameter is required.', example='2023-01-01'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The field that you use to sort the query results. Valid value:

*   regionCount: the number of regions.', example='regionCount'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid value:

*   ASC: in ascending order
*   DESC: in descending order', example='ASC'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  regionServerHosts?: [ string ](name='RegionServerHosts', description='The RegionServer hosts.', example='null'),
}

model ListDoctorHBaseRegionServersResponseBody = {
  data?: [ 
    {
      metrics?: {
        avgGc?: {
          description?: string(name='Description', description='The description of the metric.', example='The efficiency of garbage collection in the system'),
          name?: string(name='Name', description='The name of the metric.', example='avgGc'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='37.9'),
        }(name='AvgGc', description='The average garbage collection (GC) duration.'),
        cacheRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of the BlockCache memory size'),
          name?: string(name='Name', description='The name of the metric.', example='cacheRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='96.7'),
        }(name='CacheRatio', description='The cache hit ratio.'),
        dailyReadRequest?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of read requests per day'),
          name?: string(name='Name', description='The name of the metric.', example='dailyReadRequest'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='42571'),
        }(name='DailyReadRequest', description='The number of daily read requests.'),
        dailyReadRequestDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='The growth rate of daily read request quantity.'),
          name?: string(name='Name', description='The name of the metric.', example='dailyReadRequestDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='1.0'),
        }(name='DailyReadRequestDayGrowthRatio', description='The growth rate of the number of daily read requests.'),
        dailyWriteRequest?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of write requests per day'),
          name?: string(name='Name', description='The name of the metric.', example='dailyWriteRequest'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='23124'),
        }(name='DailyWriteRequest', description='The number of daily write requests.'),
        dailyWriteRequestDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='The growth rate of daily write request quantity.'),
          name?: string(name='Name', description='The name of the metric.', example='dailyWriteRequestDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='1.0'),
        }(name='DailyWriteRequestDayGrowthRatio', description='The growth rate of the number of daily write requests.'),
        regionCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of regions count'),
          name?: string(name='Name', description='The name of the metric.', example='regionCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='81'),
        }(name='RegionCount', description='The number of regions.'),
        totalReadRequest?: {
          description?: string(name='Description', description='The description of the metric.', example='Total number of read requests'),
          name?: string(name='Name', description='The name of the metric.', example='totalReadRequest'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='170500567'),
        }(name='TotalReadRequest', description='The cumulative number of read requests.'),
        totalRequest?: {
          description?: string(name='Description', description='The description of the metric.', example='Total number of requests'),
          name?: string(name='Name', description='The name of the metric.', example='totalRequest'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='89499511'),
        }(name='TotalRequest', description='The cumulative number of all requests.'),
        totalWriteRequest?: {
          description?: string(name='Description', description='The description of the metric.', example='Total number of write requests'),
          name?: string(name='Name', description='The name of the metric.', example='totalWriteRequest'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='30109837'),
        }(name='TotalWriteRequest', description='The cumulative number of write requests.'),
      }(name='Metrics', description='The metric information.'),
      regionServerHost?: string(name='RegionServerHost', description='The RegionServer host.', example='emr-worker-4.cluster-20****'),
    }
  ](name='Data', description='The returned data.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries that are returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorHBaseRegionServersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorHBaseRegionServersResponseBody(name='body'),
}

/**
 * @summary Obtains the information about multiple HBase RegionServers at a time.
 *
 * @description list Doctor HBaseRegionServers
 *
 * @param request ListDoctorHBaseRegionServersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorHBaseRegionServersResponse
 */
async function listDoctorHBaseRegionServersWithOptions(request: ListDoctorHBaseRegionServersRequest, runtime: Util.RuntimeOptions): ListDoctorHBaseRegionServersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.regionServerHosts)) {
    query['RegionServerHosts'] = request.regionServerHosts;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorHBaseRegionServers',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the information about multiple HBase RegionServers at a time.
 *
 * @description list Doctor HBaseRegionServers
 *
 * @param request ListDoctorHBaseRegionServersRequest
 * @return ListDoctorHBaseRegionServersResponse
 */
async function listDoctorHBaseRegionServers(request: ListDoctorHBaseRegionServersRequest): ListDoctorHBaseRegionServersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorHBaseRegionServersWithOptions(request, runtime);
}

model ListDoctorHBaseTablesRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='The query date.

This parameter is required.', example='2023-01-01'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries that are returned.', example='20'),
  nextToken?: string(name='NextToken', description='Marks the current position to start reading. If this field is empty, the data is read from the beginning.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The field that you use to sort the query results.

Valid values:

*   tableSize', example='tableSize'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid value:

*   ASC: in ascending order
*   DESC: in descending order', example='ASC'),
  regionId?: string(name='RegionId', description='The ID of the region.

This parameter is required.', example='cn-hangzhou'),
  tableNames?: [ string ](name='TableNames', description='The table names, which are used to filter the query results.', example='null'),
}

model ListDoctorHBaseTablesResponseBody = {
  data?: [ 
    {
      analysis?: {
        readRequestHotspotRegionList?: [ string ](name='ReadRequestHotspotRegionList', description='The regions that have read hotspot issues.', example='null'),
        readRequestUnbalanceSuggestion?: string(name='ReadRequestUnbalanceSuggestion', description='The description of read imbalance.', example='read request unbalance is <p class=\\\\"report-detail-topic\\\\">'),
        requestHotspotRegionList?: [ string ](name='RequestHotspotRegionList', description='The regions that have read/write hotspot issues.', example='null'),
        requestUnbalanceSuggestion?: string(name='RequestUnbalanceSuggestion', description='The description of read/write imbalance.', example='read request unbalance is <p class=\\\\"report-detail-topic\\\\">'),
        tableScore?: int32(name='TableScore', description='The score of the table.', example='67'),
        writeRequestHotspotRegionList?: [ string ](name='WriteRequestHotspotRegionList', description='The regions that have write hotspot issues.', example='null'),
        writeRequestUnbalanceSuggestion?: string(name='WriteRequestUnbalanceSuggestion', description='The description of write imbalance.', example='write request unbalance is <p class=\\\\"report-detail-topic\\\\">'),
      }(name='Analysis', description='The diagnosis result.'),
      metrics?: {
        coldAccessDay?: {
          description?: string(name='Description', description='The description of the metric.', example='Cold access day'),
          name?: string(name='Name', description='The name of the metric.', example='coldAccessDay'),
          unit?: string(name='Unit', description='The unit of the metric.', example='day'),
          value?: long(name='Value', description='The value of the metric.', example='1'),
        }(name='ColdAccessDay', description='The number of days during which the table was not accessed.'),
        coldConfigDay?: {
          description?: string(name='Description', description='The description of the metric.', example='Cold config day'),
          name?: string(name='Name', description='The name of the metric.', example='coldConfigDay'),
          unit?: string(name='Unit', description='The unit of the metric.', example='dat'),
          value?: long(name='Value', description='The value of the metric.', example='1'),
        }(name='ColdConfigDay', description='The number of consecutive days without access to data before the data is considered as very cold data.'),
        coldDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the cold data size'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='100'),
        }(name='ColdDataSize', description='The size of cold data.'),
        dailyReadRequest?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of read requests per day'),
          name?: string(name='Name', description='The name of the metric.', example='dailyReadRequest'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='DailyReadRequest', description='The total number of read requests for the table in a day.'),
        dailyReadRequestDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of read requests'),
          name?: string(name='Name', description='The name of the metric.', example='dailyReadRequestDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.8'),
        }(name='DailyReadRequestDayGrowthRatio', description='The daily increment ratio of the number of read requests in a day.'),
        dailyWriteRequest?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of write requests per day'),
          name?: string(name='Name', description='The name of the metric.', example='dailyWriteRequest'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='DailyWriteRequest', description='The total number of write requests for the table in a day.'),
        dailyWriteRequestDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='The balance of distributing requests'),
          name?: string(name='Name', description='The name of the metric.', example='dailyWriteRequestDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.8'),
        }(name='DailyWriteRequestDayGrowthRatio', description='The daily increment ratio of the number of write requests in a day.'),
        freezeConfigDay?: {
          description?: string(name='Description', description='The description of the metric.', example='Freeze config day'),
          name?: string(name='Name', description='The name of the metric.', example='freezeConfigDay'),
          unit?: string(name='Unit', description='The unit of the metric.', example='day'),
          value?: long(name='Value', description='The value of the metric.', example='1'),
        }(name='FreezeConfigDay', description='The number of consecutive days without access to data before the data was considered as very cold data.'),
        freezeDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the freeze data size'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='100'),
        }(name='FreezeDataSize', description='The size of very cold data.'),
        hotDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the hot data size'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='100'),
        }(name='HotDataSize', description='The size of hot data.'),
        locality?: {
          description?: string(name='Description', description='The description of the metric.', example='The locality of data'),
          name?: string(name='Name', description='The name of the metric.', example='locality'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0'),
        }(name='Locality', description='The localization rate.'),
        readRequestBalance?: {
          description?: string(name='Description', description='The description of the metric.', example='The balance of distributing read requests'),
          name?: string(name='Name', description='The name of the metric.', example='readRequestBalance'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='1.0'),
        }(name='ReadRequestBalance', description='The read balancing degree.'),
        regionBalance?: {
          description?: string(name='Description', description='The description of the metric.', example='The ability to evenly distribute Regions on different RegionServer nodes'),
          name?: string(name='Name', description='The name of the metric.', example='regionBalance'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: float(name='Value', description='The value of the metric.', example='1.0'),
        }(name='RegionBalance', description='The balancing degree.'),
        regionCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of regions count'),
          name?: string(name='Name', description='The name of the metric.', example='regionCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='3'),
        }(name='RegionCount', description='The number of regions that host the table.'),
        regionCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of region count'),
          name?: string(name='Name', description='The name of the metric.', example='regionCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='1.0'),
        }(name='RegionCountDayGrowthRatio', description='The daily increment ratio of the number of regions.'),
        regionServerCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of region servers count'),
          name?: string(name='Name', description='The name of the metric.', example='regionServerCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='2'),
        }(name='RegionServerCount', description='The number of region servers that host the table.'),
        requestBalance?: {
          description?: string(name='Description', description='The description of the metric.', example='The balance of distributing requests'),
          name?: string(name='Name', description='The name of the metric.', example='requestBalance'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: float(name='Value', description='The value of the metric.', example='0.9'),
        }(name='RequestBalance', description='The request balancing degree.'),
        storeFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of store files'),
          name?: string(name='Name', description='The name of the metric.', example='storeFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='36'),
        }(name='StoreFileCount', description='The number of StoreFiles.'),
        storeFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of store file count'),
          name?: string(name='Name', description='The name of the metric.', example='storeFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.7'),
        }(name='StoreFileCountDayGrowthRatio', description='The daily increment ratio of the number of StoreFiles.'),
        tableSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the table'),
          name?: string(name='Name', description='The name of the metric.', example='tableSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='678'),
        }(name='TableSize', description='The size of the table.'),
        tableSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of table size'),
          name?: string(name='Name', description='The name of the metric.', example='tableSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='\\\\""'),
          value?: float(name='Value', description='The value of the metric.', example='1.0'),
        }(name='TableSizeDayGrowthRatio', description='The daily increment ratio of the table size.'),
        warmConfigDay?: {
          description?: string(name='Description', description='The description of the metric.', example='Warm config day'),
          name?: string(name='Name', description='The name of the metric.', example='warmConfigDay'),
          unit?: string(name='Unit', description='The unit of the metric.', example='day'),
          value?: long(name='Value', description='The value of the metric.', example='1'),
        }(name='WarmConfigDay', description='The number of consecutive days without access to data before the data is considered as cold data.'),
        warmDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the warm data size'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='100'),
        }(name='WarmDataSize', description='The size of warm data.'),
        writeRequestBalance?: {
          description?: string(name='Description', description='The description of the metric.', example='The balance of distributing write requests'),
          name?: string(name='Name', description='The name of the metric.', example='writeRequestBalance'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='1.0'),
        }(name='WriteRequestBalance', description='The write balancing degree.'),
      }(name='Metrics', description='The metric information.'),
      tableName?: string(name='TableName', description='The name of the table.', example='tb_item'),
    }
  ](name='Data', description='The response parameters.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='The page number of the next page returned.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorHBaseTablesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorHBaseTablesResponseBody(name='body'),
}

/**
 * @summary Obtains the information about multiple HBase tables at a time.
 *
 * @description list Doctor HBaseTables
 *
 * @param request ListDoctorHBaseTablesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorHBaseTablesResponse
 */
async function listDoctorHBaseTablesWithOptions(request: ListDoctorHBaseTablesRequest, runtime: Util.RuntimeOptions): ListDoctorHBaseTablesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.tableNames)) {
    query['TableNames'] = request.tableNames;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorHBaseTables',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the information about multiple HBase tables at a time.
 *
 * @description list Doctor HBaseTables
 *
 * @param request ListDoctorHBaseTablesRequest
 * @return ListDoctorHBaseTablesResponse
 */
async function listDoctorHBaseTables(request: ListDoctorHBaseTablesRequest): ListDoctorHBaseTablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorHBaseTablesWithOptions(request, runtime);
}

model ListDoctorHDFSDirectoriesRequest {
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='This parameter is required.', example='2023-01-01'),
  dirPath?: string(name='DirPath', example='/tmp/test'),
  maxResults?: int32(name='MaxResults', description='一次获取的最大记录数。取值范围：1~100。', example='20'),
  nextToken?: string(name='NextToken', description='标记当前开始读取的位置，置空表示从头开始。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', example='smallFileCount'),
  orderType?: string(name='OrderType', example='ASC'),
  regionId?: string(name='RegionId', description='区域ID。

This parameter is required.', example='cn-hangzhou'),
}

model ListDoctorHDFSDirectoriesResponseBody = {
  data?: [ 
    {
      depth?: int32(name='Depth', example='2'),
      dirPath?: string(name='DirPath', example='/tmp/test'),
      group?: string(name='Group', example='DW'),
      metrics?: {
        coldDataDayGrowthSize?: {
          description?: string(name='Description', example='Day growth size of cold data'),
          name?: string(name='Name', example='coldDataDayGrowthSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='-182636577752'),
        }(name='ColdDataDayGrowthSize'),
        coldDataSize?: {
          description?: string(name='Description', example='Size of the cold data size'),
          name?: string(name='Name', example='coldDataSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='5570958082267'),
        }(name='ColdDataSize'),
        coldDataSizeDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of cold data size'),
          name?: string(name='Name', example='coldDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='-0.03'),
        }(name='ColdDataSizeDayGrowthRatio'),
        emptyFileCount?: {
          description?: string(name='Description', example='Number of empty files'),
          name?: string(name='Name', example='emptyFileCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='15595897'),
        }(name='EmptyFileCount'),
        emptyFileCountDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of empty files'),
          name?: string(name='Name', example='emptyFileCountDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.005'),
        }(name='EmptyFileCountDayGrowthRatio'),
        emptyFileDayGrowthCount?: {
          description?: string(name='Description', example='Day growth count of empty files'),
          name?: string(name='Name', example='emptyFileDayGrowthCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='114'),
        }(name='EmptyFileDayGrowthCount'),
        freezeDataDayGrowthSize?: {
          description?: string(name='Description', example='Day growth size of freeze data'),
          name?: string(name='Name', example='freezeDataDayGrowthSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='-167683929450'),
        }(name='FreezeDataDayGrowthSize'),
        freezeDataSize?: {
          description?: string(name='Description', example='Size of the freeze data size'),
          name?: string(name='Name', example='freezeDataSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='1231312431'),
        }(name='FreezeDataSize'),
        freezeDataSizeDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of freeze data size'),
          name?: string(name='Name', example='freezeDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='-0.09'),
        }(name='FreezeDataSizeDayGrowthRatio'),
        hotDataDayGrowthSize?: {
          description?: string(name='Description', example='Day growth size of hot data'),
          name?: string(name='Name', example='hotDataDayGrowthSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='123154'),
        }(name='HotDataDayGrowthSize'),
        hotDataSize?: {
          description?: string(name='Description', example='Size of the hot data size'),
          name?: string(name='Name', example='hotDataSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='6701531944206'),
        }(name='HotDataSize'),
        hotDataSizeDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of hot data size'),
          name?: string(name='Name', example='hotDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.1114'),
        }(name='HotDataSizeDayGrowthRatio'),
        largeFileCount?: {
          description?: string(name='Description', example='Number of large files'),
          name?: string(name='Name', example='largeFileCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='123'),
        }(name='LargeFileCount'),
        largeFileCountDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of large files'),
          name?: string(name='Name', example='largeFileCountDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.39'),
        }(name='LargeFileCountDayGrowthRatio'),
        largeFileDayGrowthCount?: {
          description?: string(name='Description', example='Day growth count of large files'),
          name?: string(name='Name', example='largeFileDayGrowthCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='2'),
        }(name='LargeFileDayGrowthCount'),
        mediumFileCount?: {
          description?: string(name='Description', example='Number of medium files'),
          name?: string(name='Name', example='mediumFileCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='323'),
        }(name='MediumFileCount'),
        mediumFileCountDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of medium files'),
          name?: string(name='Name', example='mediumFileCountDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.19'),
        }(name='MediumFileCountDayGrowthRatio'),
        mediumFileDayGrowthCount?: {
          description?: string(name='Description', example='Day growth count of medium files'),
          name?: string(name='Name', example='mediumFileDayGrowthCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='176'),
        }(name='MediumFileDayGrowthCount'),
        smallFileCount?: {
          description?: string(name='Description', example='Number of small files'),
          name?: string(name='Name', example='smallFileCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='12345'),
        }(name='SmallFileCount'),
        smallFileCountDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of small files'),
          name?: string(name='Name', example='smallFileCountDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.02'),
        }(name='SmallFileCountDayGrowthRatio'),
        smallFileDayGrowthCount?: {
          description?: string(name='Description', example='Day growth count of small files'),
          name?: string(name='Name', example='smallFileDayGrowthCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='12345'),
        }(name='SmallFileDayGrowthCount'),
        tinyFileCount?: {
          description?: string(name='Description', example='Number of tiny files'),
          name?: string(name='Name', example='tinyFileCount'),
          unit?: string(name='Unit', example='""'),
          value?: long(name='Value', example='232131'),
        }(name='TinyFileCount'),
        tinyFileCountDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of tiny files'),
          name?: string(name='Name', example='tinyFileCountDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.003'),
        }(name='TinyFileCountDayGrowthRatio'),
        tinyFileDayGrowthCount?: {
          description?: string(name='Description', example='Day growth count of tiny files'),
          name?: string(name='Name', example='tinyFileDayGrowthCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='-123'),
        }(name='TinyFileDayGrowthCount'),
        totalDataDayGrowthSize?: {
          description?: string(name='Description', example='Day growth size of total data'),
          name?: string(name='Name', example='totalDataDayGrowthSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='256482228248'),
        }(name='TotalDataDayGrowthSize'),
        totalDataSize?: {
          description?: string(name='Description', example='Total data size in megabytes (MB)'),
          name?: string(name='Name', example='totalDataSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='62086342083623'),
        }(name='TotalDataSize'),
        totalDataSizeDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of total data size'),
          name?: string(name='Name', example='totalDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.14'),
        }(name='TotalDataSizeDayGrowthRatio'),
        totalFileCount?: {
          description?: string(name='Description', example='Number of total files'),
          name?: string(name='Name', example='totalFileCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='51683279'),
        }(name='TotalFileCount'),
        totalFileCountDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of total files'),
          name?: string(name='Name', example='totalFileCountDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='0.02'),
        }(name='TotalFileCountDayGrowthRatio'),
        totalFileDayGrowthCount?: {
          description?: string(name='Description', example='Day growth count of total files'),
          name?: string(name='Name', example='totalFileDayGrowthCount'),
          unit?: string(name='Unit', example='”“'),
          value?: long(name='Value', example='27809'),
        }(name='TotalFileDayGrowthCount'),
        warmDataDayGrowthSize?: {
          description?: string(name='Description', example='Day growth size of warm data'),
          name?: string(name='Name', example='warmDataDayGrowthSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='-64806998319'),
        }(name='WarmDataDayGrowthSize'),
        warmDataSize?: {
          description?: string(name='Description', example='Size of the warm data size'),
          name?: string(name='Name', example='warmDataSize'),
          unit?: string(name='Unit', example='MB'),
          value?: long(name='Value', example='4062349775577'),
        }(name='WarmDataSize'),
        warmDataSizeDayGrowthRatio?: {
          description?: string(name='Description', example='Day growth ratio of warm data size'),
          name?: string(name='Name', example='warmDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', example='”“'),
          value?: float(name='Value', example='-0.015'),
        }(name='WarmDataSizeDayGrowthRatio'),
      }(name='Metrics'),
      user?: string(name='User', example='DW'),
    }
  ](name='Data'),
  maxResults?: int32(name='MaxResults', description='本次请求所返回的最大记录条数。', example='20'),
  nextToken?: string(name='NextToken', description='返回读取到的数据位置，空代表数据已经读取完毕。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='本次请求条件下的数据总量。', example='200'),
}

model ListDoctorHDFSDirectoriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorHDFSDirectoriesResponseBody(name='body'),
}

/**
 * @description list Doctor HDFSNodes
 *
 * @param request ListDoctorHDFSDirectoriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorHDFSDirectoriesResponse
 */
async function listDoctorHDFSDirectoriesWithOptions(request: ListDoctorHDFSDirectoriesRequest, runtime: Util.RuntimeOptions): ListDoctorHDFSDirectoriesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.dirPath)) {
    query['DirPath'] = request.dirPath;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorHDFSDirectories',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @description list Doctor HDFSNodes
 *
 * @param request ListDoctorHDFSDirectoriesRequest
 * @return ListDoctorHDFSDirectoriesResponse
 */
async function listDoctorHDFSDirectories(request: ListDoctorHDFSDirectoriesRequest): ListDoctorHDFSDirectoriesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorHDFSDirectoriesWithOptions(request, runtime);
}

model ListDoctorHDFSUGIRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The basis on which you want to sort the query results. Valid values:

*   totalFileCount: the total number of files
*   totalDataSize: the total data size
*   totalDirCount: the total number of directories', example='totalFileCount'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid values:

*   ASC: in ascending order
*   DESC: in descending order', example='ASC'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  type?: string(name='Type', description='The filter condition. Valid values:

*   user
*   group

This parameter is required.', example='group'),
}

model ListDoctorHDFSUGIResponseBody = {
  data?: [ 
    {
      metrics?: {
        totalDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
          name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='40440503'),
        }(name='TotalDataSize', description='The total data size.'),
        totalDirCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of total dirs'),
          name?: string(name='Name', description='The name of the metric.', example='totalDirCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='123'),
        }(name='TotalDirCount', description='The total number of directories.'),
        totalFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
          name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='34'),
        }(name='TotalFileCount', description='The total number of files.'),
      }(name='Metrics', description='The metric information.'),
      name?: string(name='Name', description='The actual name of the owner or group returned based on the value of Type.', example='DW'),
    }
  ](name='Data', description='The results of batch HDFS analysis.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries that are returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorHDFSUGIResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorHDFSUGIResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of Hadoop Distributed File System (HDFS) storage resources for multiple owners or groups at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor HDFS UGIs
 *
 * @param request ListDoctorHDFSUGIRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorHDFSUGIResponse
 */
async function listDoctorHDFSUGIWithOptions(request: ListDoctorHDFSUGIRequest, runtime: Util.RuntimeOptions): ListDoctorHDFSUGIResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorHDFSUGI',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of Hadoop Distributed File System (HDFS) storage resources for multiple owners or groups at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor HDFS UGIs
 *
 * @param request ListDoctorHDFSUGIRequest
 * @return ListDoctorHDFSUGIResponse
 */
async function listDoctorHDFSUGI(request: ListDoctorHDFSUGIRequest): ListDoctorHDFSUGIResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorHDFSUGIWithOptions(request, runtime);
}

model ListDoctorHiveDatabasesRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  databaseNames?: [ string ](name='DatabaseNames', description='The database names.', example='null'),
  dateTime?: string(name='DateTime', description='The query date.

This parameter is required.', example='2023-01-01'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The basis on which you want to sort the query results. Valid values:

*   tableCount: the number of tables', example='tableCount'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid values:

*   ASC: in ascending order
*   DESC: in descending order', example='ASC'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model ListDoctorHiveDatabasesResponseBody = {
  data?: [ 
    {
      analysis?: {
        hiveDistributionScore?: int32(name='HiveDistributionScore', description='The score for the distribution of files of different sizes stored in the Hive database.', example='85'),
        hiveFormatScore?: int32(name='HiveFormatScore', description='The score for the distribution of files stored in different formats in the Hive database.', example='85'),
        hiveFrequencyScore?: int32(name='HiveFrequencyScore', description='The score for the access frequency of the Hive database.', example='85'),
        hiveScore?: int32(name='HiveScore', description='The overall score of the Hive database.', example='85'),
      }(name='Analysis', description='The analysis results.'),
      databaseName?: string(name='DatabaseName', description='The database name.', example='db1'),
      formats?: [ 
        {
          formatDayGrowthSize?: long(name='FormatDayGrowthSize', description='The daily increment of storage format-specific data.', example='1000'),
          formatName?: string(name='FormatName', description='The name of the storage format.', example='TextInputFormat'),
          formatRatio?: float(name='FormatRatio', description='The proportion of data in a specific storage format.', example='0.5'),
          formatSize?: long(name='FormatSize', description='The amount of storage format-specific data.', example='1000'),
          formatSizeDayGrowthRatio?: float(name='FormatSizeDayGrowthRatio', description='The day-to-day growth rate of storage format-specific data.', example='0.5'),
          formatSizeUnit?: string(name='FormatSizeUnit', description='The unit of the amount of storage format-specific data.', example='MB'),
        }
      ](name='Formats', description='The information from the perspective of storage formats.'),
      metrics?: {
        coldDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of cold data'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='ColdDataDayGrowthSize', description='The daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
        coldDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Cold data ratio'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='ColdDataRatio', description='The proportion of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
        coldDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of cold files'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='ColdDataSize', description='The amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
        coldDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of cold data size'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='ColdDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in 90 days.'),
        emptyFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='EmptyFileCount', description='The number of empty files. Empty files are those with a size of 0 MB.'),
        emptyFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='EmptyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.'),
        emptyFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='EmptyFileDayGrowthCount', description='The daily increment of the number of empty files. Empty files are those with a size of 0 MB.'),
        emptyFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='EmptyFileRatio', description='The proportion of empty files. Empty files are those with a size of 0 MB.'),
        freezeDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of freeze data'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='FreezeDataDayGrowthSize', description='The daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        freezeDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze data'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='FreezeDataRatio', description='The proportion of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        freezeDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze files'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='FreezeDataSize', description='The amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        freezeDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of freeze data size'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='FreezeDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        hotDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of hot data'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='HotDataDayGrowthSize', description='The daily increment of the amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
        hotDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Hot data ratio'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='HotDataRatio', description='The proportion of hot data. Hot data refers to data that is accessed in recent seven days.'),
        hotDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of hot files'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='HotDataSize', description='The amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
        hotDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of hot data size'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='HotDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in recent seven days.'),
        largeFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='LargeFileCount', description='The number of large files. Large files are those with a size greater than 1 GB.'),
        largeFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='LargeFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.'),
        largeFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='LargeFileDayGrowthCount', description='The daily increment of the number of large files. Large files are those with a size greater than 1 GB.'),
        largeFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='LargeFileRatio', description='The proportion of large files. Large files are those with a size greater than 1 GB.'),
        mediumFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='MediumFileCount', description='The number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        mediumFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='MediumFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        mediumFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='MediumFileDayGrowthCount', description='The daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        mediumFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='MediumFileRatio', description='The proportion of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        partitionNum?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of partitions'),
          name?: string(name='Name', description='The name of the metric.', example='ppartitionNum'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='PartitionNum', description='The number of partitions.'),
        smallFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='SmallFileCount', description='The number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        smallFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='SmallFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        smallFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='SmallFileDayGrowthCount', description='The daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        smallFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='SmallFileRatio', description='The proportion of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        tableCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of tables'),
          name?: string(name='Name', description='The name of the metric.', example='TableCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='TableCount', description='The number of tables.'),
        tinyFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='TinyFileCount', description='The number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        tinyFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='TinyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        tinyFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='TinyFileDayGrowthCount', description='The daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        tinyFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='TinyFileRatio', description='The proportion of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        totalDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of total data'),
          name?: string(name='Name', description='The name of the metric.', example='totalDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='TotalDataDayGrowthSize', description='The daily incremental of the total data volume.'),
        totalDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
          name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='TotalDataSize', description='The total amount of data.'),
        totalDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total data size'),
          name?: string(name='Name', description='The name of the metric.', example='totalDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='TotalDataSizeDayGrowthRatio', description='The day-to-day growth rate of the total data volume.'),
        totalFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
          name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='TotalFileCount', description='The total number of files.'),
        totalFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
          name?: string(name='Name', description='The name of the metric.', example='totalFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='TotalFileCountDayGrowthRatio', description='The day-to-day growth rate of the total number of files.'),
        totalFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of total files'),
          name?: string(name='Name', description='The name of the metric.', example='totalFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='TotalFileDayGrowthCount', description='The daily increment of the total number of files.'),
        warmDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of warm data'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='WarmDataDayGrowthSize', description='The daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
        warmDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of warm data'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='WarmDataRatio', description='The proportion of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
        warmDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of warm files'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='1000'),
        }(name='WarmDataSize', description='The amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
        warmDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of warm data size'),
          name?: string(name='Name', description='The name of the metric.', example='WarmDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.5'),
        }(name='WarmDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in 30 days.'),
      }(name='Metrics', description='The metric information.'),
    }
  ](name='Data', description='The analysis results of Hive databases.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries that are returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorHiveDatabasesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorHiveDatabasesResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of multiple Hive databases at a time.
 *
 * @description list Doctor Hive Databases
 *
 * @param request ListDoctorHiveDatabasesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorHiveDatabasesResponse
 */
async function listDoctorHiveDatabasesWithOptions(request: ListDoctorHiveDatabasesRequest, runtime: Util.RuntimeOptions): ListDoctorHiveDatabasesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.databaseNames)) {
    query['DatabaseNames'] = request.databaseNames;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorHiveDatabases',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of multiple Hive databases at a time.
 *
 * @description list Doctor Hive Databases
 *
 * @param request ListDoctorHiveDatabasesRequest
 * @return ListDoctorHiveDatabasesResponse
 */
async function listDoctorHiveDatabases(request: ListDoctorHiveDatabasesRequest): ListDoctorHiveDatabasesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorHiveDatabasesWithOptions(request, runtime);
}

model ListDoctorHiveTablesRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  dateTime?: string(name='DateTime', description='Specify the date in the ISO 8601 standard. For example, 2023-01-01 represents January 1, 2023.

This parameter is required.', example='2023-01-01'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The basis on which you want to sort the query results. Valid values:

*   partitionNum: the number of partitions.
*   totalFileCount: the total number of files.
*   largeFileCount: the number of large files. Large files are those with a size greater than 1 GB.
*   mediumFileCount: the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.
*   smallFileCount: the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.
*   tinyFileCount: the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.
*   emptyFileCount: the number of empty files. Empty files are those with a size of 0 MB.
*   largeFileRatio: the proportion of large files. Large files are those with a size greater than 1 GB.
*   mediumFileRatio: the proportion of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.
*   smallFileRatio: the proportion of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.
*   tinyFileRatio: the proportion of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.
*   emptyFileRatio: the proportion of empty files. Empty files are those with a size of 0 MB.
*   hotDataSize: the amount of hot data. Hot data refers to data that is accessed in previous seven days.
*   WarmDataSize: the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.
*   coldDataSize: the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.
*   freezeDataSize: the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.
*   totalDataSize: the total amount of data.
*   hotDataRatio: the proportion of hot data. Hot data refers to data that is accessed in previous seven days.
*   WarmDataRatio: the proportion of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.
*   coldDataRatio: the proportion of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.
*   freezeDataRatio: the proportion of very cold data. Very cold data refers to data that is not accessed for more than 90 days.
*   totalFileDayGrowthCount: the daily increment of the total number of files.
*   largeFileDayGrowthCount: the daily increment of the number of large files. Large files are those with a size greater than 1 GB.
*   mediumFileDayGrowthCount: the daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.
*   smallFileDayGrowthCount: the daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.
*   tinyFileDayGrowthCount: the daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.
*   emptyFileDayGrowthCount: the daily increment of the number of empty files. Empty files are those with a size of 0 MB.
*   hotDataDayGrowthSize: the daily increment of the amount of hot data. Hot data refers to data that is accessed in previous seven days.
*   warmDataDayGrowthSize: the daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.
*   coldDataDayGrowthSize: the daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.
*   freezeDataDayGrowthSize: the daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.
*   totalDataDayGrowthSize: the daily increment of the amount of total data.
*   totalFileCountDayGrowthRatio: the day-to-day growth rate of the total number of files.
*   largeFileCountDayGrowthRatio: the day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.
*   mediumFileCountDayGrowthRatio: the day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.
*   smallFileCountDayGrowthRatio: the day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.
*   tinyFileCountDayGrowthRatio: the day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.
*   emptyFileCountDayGrowthRatio: the day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.
*   hotDataSizeDayGrowthRatio: the day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in previous seven days.
*   warmDataSizeDayGrowthRatio: the day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.
*   coldDataSizeDayGrowthRatio: the day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.
*   freezeDataSizeDayGrowthRatio: the day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.
*   totalDataSizeDayGrowthRatio: the day-to-day growth rate of the total amount of data.', example='totalFileCount'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid value:

*   ASC: in ascending order
*   DESC: in descending order', example='ASC'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  tableNames?: [ string ](name='TableNames', description='The table names, which are used to filter the query results.', example='null'),
}

model ListDoctorHiveTablesResponseBody = {
  data?: [ 
    {
      analysis?: {
        hiveDistributionScore?: int32(name='HiveDistributionScore', description='The score for the file sizes of the Hive table.', example='80'),
        hiveFormatScore?: int32(name='HiveFormatScore', description='The score for the data formats of the Hive table.', example='60'),
        hiveFrequencyScore?: int32(name='HiveFrequencyScore', description='The score for the access frequency of the Hive table.', example='70'),
        hiveScore?: int32(name='HiveScore', description='The overall score of the Hive table.', example='80'),
      }(name='Analysis', description='The analysis results.'),
      formats?: [ 
        {
          formatDayGrowthSize?: long(name='FormatDayGrowthSize', description='The daily increment of data in the format.', example='1232124'),
          formatName?: string(name='FormatName', description='The name of the storage format.', example='TextInputFormat'),
          formatRatio?: float(name='FormatRatio', description='The proportion of the data in the format.', example='0.23'),
          formatSize?: long(name='FormatSize', description='The amount of data in the format.', example='506930200'),
          formatSizeDayGrowthRatio?: float(name='FormatSizeDayGrowthRatio', description='The day-to-day growth rate of data in the format.', example='0.04'),
          formatSizeUnit?: string(name='FormatSizeUnit', description='The unit of the amount of data in the format.', example='MB'),
        }
      ](name='Formats', description='The table format information.'),
      metrics?: {
        coldDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of cold data'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='217715'),
        }(name='ColdDataDayGrowthSize', description='The daily increment of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
        coldDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Cold data ratio'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='ColdDataRatio', description='The proportion of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
        coldDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the cold data size'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='217715'),
        }(name='ColdDataSize', description='The amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
        coldDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of cold data size'),
          name?: string(name='Name', description='The name of the metric.', example='coldDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='ColdDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of cold data. Cold data refers to data that is not accessed for more than 30 days but is accessed in previous 90 days.'),
        emptyFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='3123'),
        }(name='EmptyFileCount', description='The number of empty files. Empty files are those with a size of 0 MB.'),
        emptyFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='EmptyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of empty files. Empty files are those with a size of 0 MB.'),
        emptyFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='-20'),
        }(name='EmptyFileDayGrowthCount', description='The daily increment of the number of empty files. Empty files are those with a size of 0 MB.'),
        emptyFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of empty files'),
          name?: string(name='Name', description='The name of the metric.', example='emptyFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='EmptyFileRatio', description='The proportion of empty files. Empty files are those with a size of 0 MB.'),
        freezeDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of freeze data'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='33229309'),
        }(name='FreezeDataDayGrowthSize', description='The daily increment of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        freezeDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of freeze data'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.98'),
        }(name='FreezeDataRatio', description='The proportion of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        freezeDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the freeze data size'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='33229309'),
        }(name='FreezeDataSize', description='The amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        freezeDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of freeze data size'),
          name?: string(name='Name', description='The name of the metric.', example='freezeDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='FreezeDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of very cold data. Very cold data refers to data that is not accessed for more than 90 days.'),
        hotDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of hot data'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='203431'),
        }(name='HotDataDayGrowthSize', description='The daily increment of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
        hotDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Hot data ratio'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='HotDataRatio', description='The proportion of hot data. Hot data refers to data that is accessed in previous seven days.'),
        hotDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the hot data size'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='203431'),
        }(name='HotDataSize', description='The amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
        hotDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of hot data size'),
          name?: string(name='Name', description='The name of the metric.', example='hotDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='HotDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of hot data. Hot data refers to data that is accessed in previous seven days.'),
        largeFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: long(name='Value', description='The value of the metric.', example='132'),
        }(name='LargeFileCount', description='The number of large files. Large files are those with a size greater than 1 GB.'),
        largeFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='LargeFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of large files. Large files are those with a size greater than 1 GB.'),
        largeFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='40'),
        }(name='LargeFileDayGrowthCount', description='The daily increment of the number of large files. Large files are those with a size greater than 1 GB.'),
        largeFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of large files'),
          name?: string(name='Name', description='The name of the metric.', example='largeFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.02'),
        }(name='LargeFileRatio', description='The proportion of large files. Large files are those with a size greater than 1 GB.'),
        mediumFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: long(name='Value', description='The value of the metric.', example='5'),
        }(name='MediumFileCount', description='The number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        mediumFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='MediumFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        mediumFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='20'),
        }(name='MediumFileDayGrowthCount', description='The daily increment of the number of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        mediumFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of medium files'),
          name?: string(name='Name', description='The name of the metric.', example='mediumFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.8'),
        }(name='MediumFileRatio', description='The proportion of medium files. Medium files are those with a size greater than or equal to 128 MB and less than or equal to 1 GB.'),
        partitionNum?: {
          description?: string(name='Description', description='The description of the metric.', example='number of partitions'),
          name?: string(name='Name', description='The name of the metric.', example='partitionNum'),
          unit?: string(name='Unit', description='The unit of the metric.', example='“”'),
          value?: long(name='Value', description='The value of the metric.', example='331'),
        }(name='PartitionNum', description='The number of partitions.'),
        smallFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='"“'),
          value?: long(name='Value', description='The value of the metric.', example='18'),
        }(name='SmallFileCount', description='The number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        smallFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='SmallFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        smallFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='18'),
        }(name='SmallFileDayGrowthCount', description='The daily increment of the number of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        smallFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of small files'),
          name?: string(name='Name', description='The name of the metric.', example='smallFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.04'),
        }(name='SmallFileRatio', description='The proportion of small files. Small files are those with a size greater than or equal to 10 MB and less than 128 MB.'),
        tinyFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='451'),
        }(name='TinyFileCount', description='The number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        tinyFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.04'),
        }(name='TinyFileCountDayGrowthRatio', description='The day-to-day growth rate of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        tinyFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='482'),
        }(name='TinyFileDayGrowthCount', description='The daily increment of the number of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        tinyFileRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of tiny files'),
          name?: string(name='Name', description='The name of the metric.', example='tinyFileRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.96'),
        }(name='TinyFileRatio', description='The proportion of very small files. Very small files are those with a size greater than 0 MB and less than 10 MB.'),
        totalDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of total data'),
          name?: string(name='Name', description='The name of the metric.', example='totalDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='33800296'),
        }(name='TotalDataDayGrowthSize', description='The daily increment of the total amount of data.'),
        totalDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Total data size in megabytes (MB)'),
          name?: string(name='Name', description='The name of the metric.', example='totalDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='33800296'),
        }(name='TotalDataSize', description='The total amount of data.'),
        totalDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total data size'),
          name?: string(name='Name', description='The name of the metric.', example='totalDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='TotalDataSizeDayGrowthRatio', description='The day-to-day growth rate of the total amount of data.'),
        totalFileCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Number of total files'),
          name?: string(name='Name', description='The name of the metric.', example='totalFileCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: long(name='Value', description='The value of the metric.', example='123'),
        }(name='TotalFileCount', description='The total number of files.'),
        totalFileCountDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of total files'),
          name?: string(name='Name', description='The name of the metric.', example='totalFileCountDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='TotalFileCountDayGrowthRatio', description='The day-to-day growth rate of the total number of files.'),
        totalFileDayGrowthCount?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth count of total files'),
          name?: string(name='Name', description='The name of the metric.', example='totalFileDayGrowthCount'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: long(name='Value', description='The value of the metric.', example='100'),
        }(name='TotalFileDayGrowthCount', description='The daily increment of the total number of files.'),
        warmDataDayGrowthSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth size of warm data'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataDayGrowthSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='149841'),
        }(name='WarmDataDayGrowthSize', description='The daily increment of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
        warmDataRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Ratio of warm data'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='""'),
          value?: float(name='Value', description='The value of the metric.', example='0.1'),
        }(name='WarmDataRatio', description='The proportion of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
        warmDataSize?: {
          description?: string(name='Description', description='The description of the metric.', example='Size of the warm data size'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataSize'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB'),
          value?: long(name='Value', description='The value of the metric.', example='14981'),
        }(name='WarmDataSize', description='The amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
        warmDataSizeDayGrowthRatio?: {
          description?: string(name='Description', description='The description of the metric.', example='Day growth ratio of warm data size'),
          name?: string(name='Name', description='The name of the metric.', example='warmDataSizeDayGrowthRatio'),
          unit?: string(name='Unit', description='The unit of the metric.', example='”“'),
          value?: float(name='Value', description='The value of the metric.', example='0.01'),
        }(name='WarmDataSizeDayGrowthRatio', description='The day-to-day growth rate of the amount of warm data. Warm data refers to data that is not accessed for more than 7 days but is accessed in previous 30 days.'),
      }(name='Metrics', description='The metric information.'),
      owner?: string(name='Owner', description='The owner.', example='DW'),
      tableName?: string(name='TableName', description='The table name. The table name must follow the naming rule in Hive. A name in the {Database name.Table name} format uniquely identifies a table.', example='dw.dwd_creta_service_order_long_renew_long_da'),
    }
  ](name='Data', description='The analysis results of Hive tables.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries that are returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorHiveTablesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorHiveTablesResponseBody(name='body'),
}

/**
 * @summary Obtains the analysis results of multiple Hive tables at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor Hive Tables
 *
 * @param request ListDoctorHiveTablesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorHiveTablesResponse
 */
async function listDoctorHiveTablesWithOptions(request: ListDoctorHiveTablesRequest, runtime: Util.RuntimeOptions): ListDoctorHiveTablesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.dateTime)) {
    query['DateTime'] = request.dateTime;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.tableNames)) {
    query['TableNames'] = request.tableNames;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorHiveTables',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the analysis results of multiple Hive tables at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list Doctor Hive Tables
 *
 * @param request ListDoctorHiveTablesRequest
 * @return ListDoctorHiveTablesResponse
 */
async function listDoctorHiveTables(request: ListDoctorHiveTablesRequest): ListDoctorHiveTablesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorHiveTablesWithOptions(request, runtime);
}

model ListDoctorJobsRequest {
  appIds?: [ string ](name='AppIds', description='The IDs of the jobs that are submitted to YARN.', example='null'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  endRange?: {
    endTime?: long(name='EndTime', description='The end of the time range during which jobs ended. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1666865137099'),
    startTime?: long(name='StartTime', description='The beginning of the time range during which jobs ended. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1679135111960'),
  }(name='EndRange', description='The range of end time. You can filter jobs whose end time falls within the specified time range.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The field that you use to sort the query results. Valid values:

*   vcoreSeconds: the aggregated number of vCPUs that are allocated to the job multiplied by the number of seconds the job has been running
*   memSeconds: the aggregated amount of memory that is allocated to the job multiplied by the number of seconds the job has been running', example='vcoreSeconds'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid values:

*   ASC: the ascending order
*   DESC: the descending order', example='ASC'),
  queues?: [ string ](name='Queues', description='The YARN queues to which the jobs are submitted.', example='null'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  startRange?: {
    endTime?: long(name='EndTime', description='The end of the time range during which jobs were submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1683340662020'),
    startTime?: long(name='StartTime', description='The beginning of the time range during which jobs were submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1683340662016'),
  }(name='StartRange', description='The range of start time. You can filter jobs whose start time falls within the specified time range.'),
  types?: [ string ](name='Types', description='The YARN engines to which the jobs are submitted.', example='null'),
  users?: [ string ](name='Users', description='The users who submit the jobs.', example='null'),
}

model ListDoctorJobsResponseBody = {
  data?: [ 
    {
      appId?: string(name='AppId', description='The ID of the job that was submitted to YARN.', example='application_1607584549220_*****'),
      appName?: string(name='AppName', description='The name of the job.', example='tpcds'),
      elapsedTime?: long(name='ElapsedTime', description='The total running time of the job. Unit: milliseconds.', example='242'),
      finalStatus?: string(name='FinalStatus', description='The final state of the job. Valid values:

*   SUCCEEDED
*   FAILED
*   KILLED
*   ENDED
*   UNDEFINED', example='KILLED'),
      finishTime?: long(name='FinishTime', description='The end time of the job. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1683690929000'),
      launchTime?: long(name='LaunchTime', description='The time when the job was started. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1672148400000'),
      metrics?: {
        memSeconds?: {
          description?: string(name='Description', description='The description of the metric.', example='Total memory usage over time in seconds'),
          name?: string(name='Name', description='The name of the metric.', example='memSeconds'),
          unit?: string(name='Unit', description='The unit of the metric.', example='MB * Sec'),
          value?: long(name='Value', description='The value of the metric.', example='12312312'),
        }(name='MemSeconds', description='The amount of memory consumed.'),
        vcoreSeconds?: {
          description?: string(name='Description', description='The description of the metric.', example='Total vcore usage over time in seconds'),
          name?: string(name='Name', description='The name of the metric.', example='vcoreSeconds'),
          unit?: string(name='Unit', description='The unit of the metric.', example='VCores * Sec'),
          value?: long(name='Value', description='The value of the metric.', example='11123'),
        }(name='VcoreSeconds', description='The CPU usage.'),
      }(name='Metrics', description='The data about the metrics.'),
      queue?: string(name='Queue', description='The YARN queue to which the job was submitted.', example='DW'),
      startTime?: long(name='StartTime', description='The time when the job was submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1675180800000'),
      state?: string(name='State', description='The running state of the job. Valid values:

*   FINISHED
*   FAILED
*   KILLED', example='FINISHED'),
      type?: string(name='Type', description='The type of the compute engine.', example='SPARK'),
      user?: string(name='User', description='The username that was used to submit the job.', example='DW'),
    }
  ](name='Data', description='The information about the jobs.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorJobsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorJobsResponseBody(name='body'),
}

/**
 * @summary Obtains the basic running information about multiple jobs at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list realtime jobs by yarn
 *
 * @param request ListDoctorJobsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorJobsResponse
 */
async function listDoctorJobsWithOptions(request: ListDoctorJobsRequest, runtime: Util.RuntimeOptions): ListDoctorJobsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.appIds)) {
    query['AppIds'] = request.appIds;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.endRange)) {
    query['EndRange'] = request.endRange;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.queues)) {
    query['Queues'] = request.queues;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.startRange)) {
    query['StartRange'] = request.startRange;
  }
  if (!Util.isUnset(request.types)) {
    query['Types'] = request.types;
  }
  if (!Util.isUnset(request.users)) {
    query['Users'] = request.users;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorJobs',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the basic running information about multiple jobs at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list realtime jobs by yarn
 *
 * @param request ListDoctorJobsRequest
 * @return ListDoctorJobsResponse
 */
async function listDoctorJobs(request: ListDoctorJobsRequest): ListDoctorJobsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorJobsWithOptions(request, runtime);
}

model ListDoctorJobsStatsRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  endRange?: {
    endTime?: long(name='EndTime', description='The end of the time range during which jobs ended. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1680019200000'),
    startTime?: long(name='StartTime', description='The beginning of the time range during which jobs ended. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC.', example='1675180800000'),
  }(name='EndRange', description='The range of end time. You can filter jobs whose end time falls within the specified time range.'),
  groupBy?: [ string ](name='GroupBy', description='The fields that are used for grouping data.

Currently, only the first value is used for grouping data. Combinations of multiple values will be supported in the future.', example='null'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  orderBy?: string(name='OrderBy', description='The field that you use to sort the query results. Valid values:

*   vcoreSeconds: the aggregated number of vCPUs that are allocated to the job multiplied by the number of seconds the job has been running
*   memSeconds: the aggregated amount of memory that is allocated to the job multiplied by the number of seconds the job has been running', example='vcoreSeconds'),
  orderType?: string(name='OrderType', description='The order in which you want to sort the query results. Valid values:

*   ASC: in ascending order
*   DESC: in descending order', example='ASC'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  startRange?: {
    endTime?: long(name='EndTime', description='The end of the time range during which jobs were submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1666406820000'),
    startTime?: long(name='StartTime', description='The beginning of the time range during which jobs were submitted. This value is a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Unit: milliseconds.', example='1679036826987'),
  }(name='StartRange', description='The range of start time. You can filter jobs whose start time falls within the specified time range.'),
}

model ListDoctorJobsStatsResponseBody = {
  data?: [ 
    {
      appsCount?: {
        description?: string(name='Description', description='The description of the metric.', example='Total apps count'),
        name?: string(name='Name', description='The name of the metric.', example='appsCount'),
        unit?: string(name='Unit', description='The unit of the metric.', example='""'),
        value?: long(name='Value', description='The value of the metric.', example='123'),
      }(name='AppsCount', description='The total number of jobs.'),
      memSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total memory usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='memSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='MB * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='12312312'),
      }(name='MemSeconds', description='The aggregated amount of memory that is allocated to the job multiplied by the number of seconds the job has been running.'),
      queue?: string(name='Queue', description='The YARN queue to which the job was submitted.', example='DW'),
      type?: string(name='Type', description='The type of the compute engine.', example='SPARK'),
      user?: string(name='User', description='The username that is used to submit the job.', example='DW'),
      vcoreSeconds?: {
        description?: string(name='Description', description='The description of the metric.', example='Total vcore usage over time in seconds'),
        name?: string(name='Name', description='The name of the metric.', example='vcoreSeconds'),
        unit?: string(name='Unit', description='The unit of the metric.', example='VCores * Sec'),
        value?: long(name='Value', description='The value of the metric.', example='11123'),
      }(name='VcoreSeconds', description='The aggregated number of vCPUs that are allocated to the job multiplied by the number of seconds the job has been running.'),
    }
  ](name='Data', description='The summary of job information.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorJobsStatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorJobsStatsResponseBody(name='body'),
}

/**
 * @summary Obtains the summary of basic running information about multiple jobs at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list stats groupBy jobs by yarn
 *
 * @param request ListDoctorJobsStatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorJobsStatsResponse
 */
async function listDoctorJobsStatsWithOptions(request: ListDoctorJobsStatsRequest, runtime: Util.RuntimeOptions): ListDoctorJobsStatsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.endRange)) {
    query['EndRange'] = request.endRange;
  }
  if (!Util.isUnset(request.groupBy)) {
    query['GroupBy'] = request.groupBy;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!Util.isUnset(request.orderType)) {
    query['OrderType'] = request.orderType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.startRange)) {
    query['StartRange'] = request.startRange;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorJobsStats',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the summary of basic running information about multiple jobs at a time on E-MapReduce (EMR) Doctor.
 *
 * @description list stats groupBy jobs by yarn
 *
 * @param request ListDoctorJobsStatsRequest
 * @return ListDoctorJobsStatsResponse
 */
async function listDoctorJobsStats(request: ListDoctorJobsStatsRequest): ListDoctorJobsStatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorJobsStatsWithOptions(request, runtime);
}

model ListDoctorReportsRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  maxResults?: int32(name='MaxResults', description='The number of entries to return on each page.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model ListDoctorReportsResponseBody = {
  data?: [ 
    {
      componentTypes?: [ string ](name='ComponentTypes', description='The component types.

Valid values:

*   compute

    <!-- -->

    <!-- -->

    <!-- -->

*   hive

    <!-- -->

    <!-- -->

    <!-- -->

*   hdfs

    <!-- -->

    <!-- -->

    <!-- -->

*   yarn

    <!-- -->

    <!-- -->

    <!-- -->

*   oss

    <!-- -->

    <!-- -->

    <!-- -->

*   hbase

    <!-- -->

    <!-- -->

    <!-- -->', example='null'),
      dateTime?: string(name='DateTime', description='The date on which the report was generated.', example='2023-06-29'),
      summaryReport?: {
        score?: int32(name='Score', description='The score.', example='88'),
        suggestion?: string(name='Suggestion', description='The optimization suggestion.', example='block'),
        summary?: string(name='Summary', description='The summary of the report.', example='eastbuy-mse-plugin-auth'),
      }(name='SummaryReport', description='The summary of the report.'),
    }
  ](name='Data', description='The reports.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='A pagination token.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListDoctorReportsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListDoctorReportsResponseBody(name='body'),
}

/**
 * @summary Obtains the overall analysis result reports of E-MapReduce (EMR) Doctor at a time.
 *
 * @description list all reports analysis by emr doctor
 *
 * @param request ListDoctorReportsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListDoctorReportsResponse
 */
async function listDoctorReportsWithOptions(request: ListDoctorReportsRequest, runtime: Util.RuntimeOptions): ListDoctorReportsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListDoctorReports',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Obtains the overall analysis result reports of E-MapReduce (EMR) Doctor at a time.
 *
 * @description list all reports analysis by emr doctor
 *
 * @param request ListDoctorReportsRequest
 * @return ListDoctorReportsResponse
 */
async function listDoctorReports(request: ListDoctorReportsRequest): ListDoctorReportsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listDoctorReportsWithOptions(request, runtime);
}

model ListInstanceTypesRequest {
  clusterId?: string(name='ClusterId', description='The ID of cluster.', example='c-b933c5aac8fe****'),
  clusterType?: string(name='ClusterType', description='Cluster type.

This parameter is required.', example='DATALAKE'),
  deployMode?: string(name='DeployMode', description='Deployment mode.', example='HA'),
  instanceType?: string(name='InstanceType', description='Instance Type', example='ecs.g6.xlarge'),
  isModification?: boolean(name='IsModification', description='Whether to change the configuration.', example='false'),
  nodeGroupId?: string(name='NodeGroupId', description='Node group ID.', example='G-F06C4B47966A****'),
  nodeGroupType?: string(name='NodeGroupType', description='Node group type.

This parameter is required.', example='CORE'),
  paymentType?: string(name='PaymentType', description='Payment type.

This parameter is required.', example='PayAsYouGo'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
  releaseVersion?: string(name='ReleaseVersion', description='EMR distribution.', example='EMR-5.8.0'),
  zoneId?: string(name='ZoneId', description='Availability Zone ID

This parameter is required.', example='cn-beijing-h'),
}

model ListInstanceTypesResponseBody = {
  instanceTypes?: [
    InstanceType
  ](name='InstanceTypes', description='The instance types.'),
  maxResults?: int32(name='MaxResults', description='The maximum number of records returned in this request.', example='20'),
  nextToken?: string(name='NextToken', description='Returns the position of the read data.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total amount of data under the conditions of this request.', example='200'),
}

model ListInstanceTypesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListInstanceTypesResponseBody(name='body'),
}

/**
 * @summary Lists instance types.
 *
 * @param request ListInstanceTypesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListInstanceTypesResponse
 */
async function listInstanceTypesWithOptions(request: ListInstanceTypesRequest, runtime: Util.RuntimeOptions): ListInstanceTypesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterType)) {
    query['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.deployMode)) {
    query['DeployMode'] = request.deployMode;
  }
  if (!Util.isUnset(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!Util.isUnset(request.isModification)) {
    query['IsModification'] = request.isModification;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.nodeGroupType)) {
    query['NodeGroupType'] = request.nodeGroupType;
  }
  if (!Util.isUnset(request.paymentType)) {
    query['PaymentType'] = request.paymentType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.releaseVersion)) {
    query['ReleaseVersion'] = request.releaseVersion;
  }
  if (!Util.isUnset(request.zoneId)) {
    query['ZoneId'] = request.zoneId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListInstanceTypes',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Lists instance types.
 *
 * @param request ListInstanceTypesRequest
 * @return ListInstanceTypesResponse
 */
async function listInstanceTypes(request: ListInstanceTypesRequest): ListInstanceTypesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listInstanceTypesWithOptions(request, runtime);
}

model ListNodeGroupsRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  maxResults?: int32(name='MaxResults', description='The number of maximum number of records to obtain at a time. Valid values: 1 to 100.', example='20'),
  nextToken?: string(name='NextToken', description='Marks the current position where reading starts. If you set this value to null, you can start from the beginning.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodeGroupIds?: [ string ](name='NodeGroupIds', description='The IDs of node groups. Valid values of the number of array elements N: 1 to 100.', example='c-b933c5aac8fe****'),
  nodeGroupNames?: [ string ](name='NodeGroupNames', description='The list of node group names. Valid values of the number of array elements N: 1 to 100.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodeGroupStates?: [ string ](name='NodeGroupStates', description='The status of the node group. Valid values of the number of array elements N: 1 to 100.', example='["CORE"]'),
  nodeGroupTypes?: [ string ](name='NodeGroupTypes', description='The list of node group types. Valid values of the number of array elements N: 1 to 100.', example='20'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
}

model ListNodeGroupsResponseBody = {
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='Returns the location of the data that was read. Empty indicates that the data has been read.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodeGroups?: [
    NodeGroup
  ](name='NodeGroups', description='The array of node groups.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListNodeGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListNodeGroupsResponseBody(name='body'),
}

/**
 * @summary Queries the list of node groups in an EMR cluster.
 *
 * @param request ListNodeGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListNodeGroupsResponse
 */
async function listNodeGroupsWithOptions(request: ListNodeGroupsRequest, runtime: Util.RuntimeOptions): ListNodeGroupsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.nodeGroupIds)) {
    query['NodeGroupIds'] = request.nodeGroupIds;
  }
  if (!Util.isUnset(request.nodeGroupNames)) {
    query['NodeGroupNames'] = request.nodeGroupNames;
  }
  if (!Util.isUnset(request.nodeGroupStates)) {
    query['NodeGroupStates'] = request.nodeGroupStates;
  }
  if (!Util.isUnset(request.nodeGroupTypes)) {
    query['NodeGroupTypes'] = request.nodeGroupTypes;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListNodeGroups',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the list of node groups in an EMR cluster.
 *
 * @param request ListNodeGroupsRequest
 * @return ListNodeGroupsResponse
 */
async function listNodeGroups(request: ListNodeGroupsRequest): ListNodeGroupsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNodeGroupsWithOptions(request, runtime);
}

model ListNodesRequest {
  clusterId?: string(name='ClusterId', description='The ID of the cluster.

This parameter is required.', example='c-b933c5aac8fe****'),
  maxResults?: int32(name='MaxResults', description='The number of maximum number of records to obtain at a time. Valid values: 1 to 100.', example='20'),
  nextToken?: string(name='NextToken', description='Marks the current position where reading starts. If you set this value to null, you can start from the beginning.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodeGroupIds?: [ string ](name='NodeGroupIds', description='The IDs of node groups.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodeIds?: [ string ](name='NodeIds', description='An array that consists of information about the ID of the node.', example='c-b933c5aac8fe****'),
  nodeNames?: [ string ](name='NodeNames', description='The names of the nodes.', example='20'),
  nodeStates?: [ string ](name='NodeStates', description='The status of the node.', example='["CREATED"]'),
  privateIps?: [ string ](name='PrivateIps', description='The private IP address.', example='["172.12.0.91"]'),
  publicIps?: [ string ](name='PublicIps', description='The public IP address.', example='["120.13.14.38"]'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
  tags?: [
    Tag
  ](name='Tags', description='The list of tags to be bound.'),
}

model ListNodesResponseBody = {
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='The position at which the next read starts. If null is returned, the data has been read.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  nodes?: [
    Node
  ](name='Nodes', description='Details about nodes.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of records in this request.', example='200'),
}

model ListNodesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListNodesResponseBody(name='body'),
}

/**
 * @summary Queries the node list of an EMR cluster.
 *
 * @param request ListNodesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListNodesResponse
 */
async function listNodesWithOptions(request: ListNodesRequest, runtime: Util.RuntimeOptions): ListNodesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.nodeGroupIds)) {
    query['NodeGroupIds'] = request.nodeGroupIds;
  }
  if (!Util.isUnset(request.nodeIds)) {
    query['NodeIds'] = request.nodeIds;
  }
  if (!Util.isUnset(request.nodeNames)) {
    query['NodeNames'] = request.nodeNames;
  }
  if (!Util.isUnset(request.nodeStates)) {
    query['NodeStates'] = request.nodeStates;
  }
  if (!Util.isUnset(request.privateIps)) {
    query['PrivateIps'] = request.privateIps;
  }
  if (!Util.isUnset(request.publicIps)) {
    query['PublicIps'] = request.publicIps;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListNodes',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the node list of an EMR cluster.
 *
 * @param request ListNodesRequest
 * @return ListNodesResponse
 */
async function listNodes(request: ListNodesRequest): ListNodesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listNodesWithOptions(request, runtime);
}

model ListReleaseVersionsRequest {
  clusterType?: string(name='ClusterType', description='The type of the cluster.

This parameter is required.', example='DATALAKE'),
  iaasType?: string(name='IaasType', description='The type of the IaaS resource.', example='ECS'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model ListReleaseVersionsResponseBody = {
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='Returns the location of the data that was read.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  releaseVersions?: [ 
    {
      iaasType?: string(name='IaasType', description='The IaaS type.', example='ECS'),
      releaseVersion?: string(name='ReleaseVersion', description='The EMR version.', example='EMR-5.3.0'),
      series?: string(name='Series', description='The version series.', example='EMR-6.X'),
    }
  ](name='ReleaseVersions', description='The major EMR versions.'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListReleaseVersionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListReleaseVersionsResponseBody(name='body'),
}

/**
 * @summary Queries the major E-MapReduce (EMR) versions.
 *
 * @description 查询主版本。
 *
 * @param request ListReleaseVersionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListReleaseVersionsResponse
 */
async function listReleaseVersionsWithOptions(request: ListReleaseVersionsRequest, runtime: Util.RuntimeOptions): ListReleaseVersionsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterType)) {
    query['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.iaasType)) {
    query['IaasType'] = request.iaasType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListReleaseVersions',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the major E-MapReduce (EMR) versions.
 *
 * @description 查询主版本。
 *
 * @param request ListReleaseVersionsRequest
 * @return ListReleaseVersionsResponse
 */
async function listReleaseVersions(request: ListReleaseVersionsRequest): ListReleaseVersionsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listReleaseVersionsWithOptions(request, runtime);
}

model ListScriptsRequest {
  clusterId?: string(name='ClusterId', description='Cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  maxResults?: int32(name='MaxResults', description='The maximum number of records to retrieve at once.', example='10'),
  nextToken?: string(name='NextToken', description='Marks the current position to start reading from.', example='dd6b1b2a-5837-5237-abe4-ff0c89568980'),
  regionId?: string(name='RegionId', description='Region ID.

This parameter is required.', example='cn-hangzhou'),
  scriptId?: string(name='ScriptId', description='The script ID. Only common scripts are supported.'),
  scriptName?: string(name='ScriptName', description='The name of the script. Only common scripts are supported. Fuzzy search is supported.'),
  scriptType?: string(name='ScriptType', description='Type of cluster script. Possible values:

- BOOTSTRAP: Bootstrap script.
- NORMAL: Regular cluster script.

This parameter is required.', example='BOOTSTRAP'),
  statuses?: [ string ](name='Statuses', description='The status of the script. Only common scripts are supported.'),
}

model ListScriptsResponseBody = {
  maxResults?: int32(name='MaxResults', description='The maximum number of records returned in this request.', example='10'),
  nextToken?: string(name='NextToken', description='The position of the data read.', example='dd6b1b2a-5837-5237-abe4-ff0c89568982'),
  requestId?: string(name='RequestId', description='Request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  scripts?: [ 
    {
      action?: string(name='Action', description='API name.', example='ListScripts'),
      endTime?: long(name='EndTime', description='End execution time. This value is returned only when `ScriptType` is `NORMAL`.', example='1639715635819'),
      executionFailStrategy?: string(name='ExecutionFailStrategy', description='Execution failure strategy. Possible values:

- FAILED_CONTINUE: Continue after failure.
- FAILED_BLOCK: Block after failure.', example='FAILED_CONTINUE'),
      executionMoment?: string(name='ExecutionMoment', description='Execution timing. Possible values:

- BEFORE_INSTALL: Before application installation.
- AFTER_STARTED: After application startup.', example='BEFORE_INSTALL'),
      executionState?: string(name='ExecutionState', description='Script execution state. This value is returned only when `ScriptType` is `NORMAL`. Possible values:

- SCRIPT_COMPLETED: Script executed successfully.
- SCRIPT_SUBMISSION_FAILED: Script execution failed.
- SCRIPT_RUNNING: Script is running.', example='SCRIPT_COMPLETED'),
      lastUpdateTime?: long(name='LastUpdateTime', description='Time of the last update.', example='1639714634819'),
      nodeSelector?: NodeSelector(name='NodeSelector', description='The node selector.'),
      regionId?: string(name='RegionId', description='Region ID.', example='cn-hangzhou'),
      scriptArgs?: string(name='ScriptArgs', description='Script execution parameters.', example='--mode=client -h -p'),
      scriptId?: string(name='ScriptId', description='Script ID.', example='cs-bf25219d103043a0820613e32781****'),
      scriptName?: string(name='ScriptName', description='Script name.', example='check_env'),
      scriptPath?: string(name='ScriptPath', description='Script path.', example='oss://bucket1/check_evn.sh'),
      startTime?: long(name='StartTime', description='Start execution time. This value is returned only when `ScriptType` is `NORMAL`.', example='1639714634000'),
    }
  ](name='Scripts', description='The scripts.'),
  totalCount?: int32(name='TotalCount', description='The total amount of data under the conditions of this request.', example='200'),
}

model ListScriptsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListScriptsResponseBody(name='body'),
}

/**
 * @summary Query EMR cluster bootstrap scripts or regular scripts.
 *
 * @param request ListScriptsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListScriptsResponse
 */
async function listScriptsWithOptions(request: ListScriptsRequest, runtime: Util.RuntimeOptions): ListScriptsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.scriptName)) {
    query['ScriptName'] = request.scriptName;
  }
  if (!Util.isUnset(request.scriptType)) {
    query['ScriptType'] = request.scriptType;
  }
  if (!Util.isUnset(request.statuses)) {
    query['Statuses'] = request.statuses;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListScripts',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query EMR cluster bootstrap scripts or regular scripts.
 *
 * @param request ListScriptsRequest
 * @return ListScriptsResponse
 */
async function listScripts(request: ListScriptsRequest): ListScriptsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listScriptsWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  maxResults?: int32(name='MaxResults', description='The number of maximum number of records to obtain at a time.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the request to retrieve a new page of results. If NextToken is empty, the query starts from the beginning.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
  resourceIds?: [ string ](name='ResourceIds', description='The list of resource IDs. Number of array elements N Valid values: 1 to 1

This parameter is required.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Set the value to cluster.

This parameter is required.', example='cluster'),
  tags?: [
    Tag
  ](name='Tags', description='The array of tags. The number of array elements N. Valid values: 1 to 20.', example='20'),
}

model ListTagResourcesResponseBody = {
  maxResults?: int32(name='MaxResults', description='The maximum number of entries returned.', example='20'),
  nextToken?: string(name='NextToken', description='Returns the location of the data that was read. Empty indicates that the data has been read.', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='The ID of the request.', example='372D4E9B-2509-5EFA-846B-B34FBF143F56'),
  tagResources?: [ 
    {
      resourceId?: string(name='ResourceId', description='Indicates the ID of a resource.', example='c-b933c5aac8fe****'),
      resourceType?: string(name='ResourceType', description='The resource type.', example='cluster'),
      tagKey?: string(name='TagKey', description='The tag key of the ENI.', example='Department'),
      tagValue?: string(name='TagValue', description='The tag value of the ENI.', example='Dev'),
    }
  ](name='TagResources', description='The details about the tag. Contains the resource ID, resource type, and tag key-value information.'),
  totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='200'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @summary Queries the tags that are bound to an EMR cluster.
 *
 * @param request ListTagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: Util.RuntimeOptions): ListTagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListTagResources',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the tags that are bound to an EMR cluster.
 *
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ListUsersRequest {
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  maxResults?: int32(name='MaxResults', description='一次获取的最大记录数。取值范围：1~100。', example='20'),
  nextToken?: string(name='NextToken', description='标记当前开始读取的位置，置空表示从头开始。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  regionId?: string(name='RegionId', description='区域ID。

This parameter is required.', example='cn-hangzhou'),
  userName?: string(name='UserName', description='用户名，支持模糊搜索。', example='test'),
  userNames?: [ string ](name='UserNames'),
}

model ListUsersResponseBody = {
  isAdmin?: boolean(name='IsAdmin', example='False', deprecated=true),
  maxResults?: int32(name='MaxResults', description='本次请求所返回的最大记录条数。', example='20'),
  nextToken?: string(name='NextToken', description='返回读取到的数据位置，空代表数据已经读取完毕。', example='DD6B1B2A-5837-5237-ABE4-FF0C89568980'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  totalCount?: int32(name='TotalCount', description='本次请求条件下的数据总量。', example='200'),
  users?: [ 
    {
      createTime?: long(name='CreateTime', description='创建时间。', example='1509338726362'),
      description?: string(name='Description', description='备注。', example='添加test用户'),
      keytabHex?: string(name='KeytabHex', description='Keytab内容Base64编码。', example='DBEDASDF=='),
      ldapUrl?: string(name='LdapUrl', description='LDAP链接。
ldap://emr-header-1.cluster-50018****:10389', example='ldap://master-1-1.c-c6ce2d16d118****.cn-hangzhou.emr.aliyuncs.com:10389'),
      userId?: string(name='UserId', description='用户ID。', example='125046002175****'),
      userName?: string(name='UserName', description='用户名称。
test', example='yun****'),
    }
  ](name='Users', description='用户列表。'),
}

model ListUsersResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListUsersResponseBody(name='body'),
}

/**
 * @param request ListUsersRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListUsersResponse
 */
async function listUsersWithOptions(request: ListUsersRequest, runtime: Util.RuntimeOptions): ListUsersResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!Util.isUnset(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.userName)) {
    query['UserName'] = request.userName;
  }
  if (!Util.isUnset(request.userNames)) {
    query['UserNames'] = request.userNames;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListUsers',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ListUsersRequest
 * @return ListUsersResponse
 */
async function listUsers(request: ListUsersRequest): ListUsersResponse {
  var runtime = new Util.RuntimeOptions{};
  return listUsersWithOptions(request, runtime);
}

model PutAutoScalingPolicyRequest {
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  constraints?: ScalingConstraints(name='Constraints', description='The maximum and minimum numbers of nodes in a node group.'),
  nodeGroupId?: string(name='NodeGroupId', description='节点组ID。节点组 Id-针对 ACK 集群，此字段为空。

This parameter is required.', example='ng-869471354ecd****'),
  regionId?: string(name='RegionId', description='区域ID。

This parameter is required.', example='cn-hangzhou'),
  scalingRules?: [
    ScalingRule
  ](name='ScalingRules', description='The auto scaling rules. Number of elements in the array: 0 to 100.'),
}

model PutAutoScalingPolicyResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model PutAutoScalingPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PutAutoScalingPolicyResponseBody(name='body'),
}

/**
 * @summary Configures auto scaling rules.
 *
 * @description You can call this operation to configure auto scaling policies.
 *
 * @param request PutAutoScalingPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PutAutoScalingPolicyResponse
 */
async function putAutoScalingPolicyWithOptions(request: PutAutoScalingPolicyRequest, runtime: Util.RuntimeOptions): PutAutoScalingPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.constraints)) {
    query['Constraints'] = request.constraints;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scalingRules)) {
    query['ScalingRules'] = request.scalingRules;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'PutAutoScalingPolicy',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Configures auto scaling rules.
 *
 * @description You can call this operation to configure auto scaling policies.
 *
 * @param request PutAutoScalingPolicyRequest
 * @return PutAutoScalingPolicyResponse
 */
async function putAutoScalingPolicy(request: PutAutoScalingPolicyRequest): PutAutoScalingPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return putAutoScalingPolicyWithOptions(request, runtime);
}

model RemoveAutoScalingPolicyRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  nodeGroupId?: string(name='NodeGroupId', description='The ID of the node group.

This parameter is required.', example='ng-869471354ecd****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model RemoveAutoScalingPolicyResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model RemoveAutoScalingPolicyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RemoveAutoScalingPolicyResponseBody(name='body'),
}

/**
 * @param request RemoveAutoScalingPolicyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RemoveAutoScalingPolicyResponse
 */
async function removeAutoScalingPolicyWithOptions(request: RemoveAutoScalingPolicyRequest, runtime: Util.RuntimeOptions): RemoveAutoScalingPolicyResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RemoveAutoScalingPolicy',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request RemoveAutoScalingPolicyRequest
 * @return RemoveAutoScalingPolicyResponse
 */
async function removeAutoScalingPolicy(request: RemoveAutoScalingPolicyRequest): RemoveAutoScalingPolicyResponse {
  var runtime = new Util.RuntimeOptions{};
  return removeAutoScalingPolicyWithOptions(request, runtime);
}

model RunApiTemplateRequest {
  apiName?: string(name='ApiName', description='接口名。

This parameter is required.', example='CreateCluster'),
  clientToken?: string(name='ClientToken', description='幂等客户端TOKEN。', example='A7D960FA-6DBA-5E07-8746-A63E3E4D****'),
  regionId?: string(name='RegionId', description='地域ID。

This parameter is required.', example='cn-hangzhou'),
  templateId?: string(name='TemplateId', description='集群模板id。

This parameter is required.', example='AT-****'),
}

model RunApiTemplateResponseBody = {
  data?: string(name='Data', example='{\\\\"clusterId\\\\":\\\\"c-b7be171f1928****\\\\",\\\\"operationId\\\\":\\\\"op-61126efe629d****\\\\"}'),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model RunApiTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunApiTemplateResponseBody(name='body'),
}

/**
 * @param request RunApiTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunApiTemplateResponse
 */
async function runApiTemplateWithOptions(request: RunApiTemplateRequest, runtime: Util.RuntimeOptions): RunApiTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.clientToken)) {
    query['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RunApiTemplate',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request RunApiTemplateRequest
 * @return RunApiTemplateResponse
 */
async function runApiTemplate(request: RunApiTemplateRequest): RunApiTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return runApiTemplateWithOptions(request, runtime);
}

model RunApplicationActionRequest {
  actionName?: string(name='ActionName', description='The name of the action. Valid values:

*   start
*   stop
*   config
*   restart
*   refresh_queues
*   refresh_labels

This parameter is required.', example='start'),
  batchSize?: int32(name='BatchSize', description='The number of applications in each batch.', example='1'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='C-C95F0A39D8FF****'),
  componentInstanceSelector?: ComponentInstanceSelector(name='ComponentInstanceSelector', description='The operation object.

This parameter is required.'),
  description?: string(name='Description', description='The description of the execution.', example='运行描述'),
  executeStrategy?: string(name='ExecuteStrategy', description='The execution policy. Valid values:

*   FAILED_BLOCK: The system stops the execution if the execution fails.
*   FAILED_CONTINUE: The system continues the execution if the execution fails.', example='FAILED_CONTINUE'),
  interval?: long(name='Interval', description='The interval for rolling execution. Unit: seconds.', example='10'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  rollingExecute?: boolean(name='RollingExecute', description='Specifies whether to enable rolling execution.', example='true'),
}

model RunApplicationActionResponseBody = {
  abnInstances?: [ 
    {
      nodeId?: string(name='NodeId', description='The ID of the abnormal node.', example='i-bp1cudc25w2bfwl5****'),
      nodeName?: string(name='NodeName', description='The name of the abnormal node.', example='core1-1'),
    }
  ](name='AbnInstances', description='The abnormal nodes.'),
  operationId?: string(name='OperationId', description='The operation ID.', example='op-13c37a77c505****'),
  requestId?: string(name='RequestId', description='The request ID.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3****'),
}

model RunApplicationActionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunApplicationActionResponseBody(name='body'),
}

/**
 * @summary Manages a service deployed in a cluster. For example, you can call this operation to start pr stop a service.
 *
 * @param request RunApplicationActionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunApplicationActionResponse
 */
async function runApplicationActionWithOptions(request: RunApplicationActionRequest, runtime: Util.RuntimeOptions): RunApplicationActionResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.actionName)) {
    query['ActionName'] = request.actionName;
  }
  if (!Util.isUnset(request.batchSize)) {
    query['BatchSize'] = request.batchSize;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.componentInstanceSelector)) {
    query['ComponentInstanceSelector'] = request.componentInstanceSelector;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.executeStrategy)) {
    query['ExecuteStrategy'] = request.executeStrategy;
  }
  if (!Util.isUnset(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.rollingExecute)) {
    query['RollingExecute'] = request.rollingExecute;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'RunApplicationAction',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Manages a service deployed in a cluster. For example, you can call this operation to start pr stop a service.
 *
 * @param request RunApplicationActionRequest
 * @return RunApplicationActionResponse
 */
async function runApplicationAction(request: RunApplicationActionRequest): RunApplicationActionResponse {
  var runtime = new Util.RuntimeOptions{};
  return runApplicationActionWithOptions(request, runtime);
}

model RunClusterRequest {
  applicationConfigs?: [
    ApplicationConfig
  ](name='ApplicationConfigs', description='The application configurations. Number of elements in the array: 1 to 1000.'),
  applications?: [
    Application
  ](name='Applications', description='The services. Number of elements in the array: 1 to 100.

This parameter is required.'),
  bootstrapScripts?: [
    Script
  ](name='BootstrapScripts', description='The bootstrap actions. Number of elements in the array: 1 to 10.'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. The same ClientToken value for multiple calls to the RunCluster operation results in identical responses. Only one cluster can be created by using the same ClientToken value.', example='A7D960FA-6DBA-5E07-8746-A63E3E4D****'),
  clusterName?: string(name='ClusterName', description='The cluster name. The name must be 1 to 128 characters in length. The name must start with a letter but cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

This parameter is required.', example='emrtest'),
  clusterType?: string(name='ClusterType', description='The type of the cluster. Valid values:

*   DATALAKE
*   OLAP
*   DATAFLOW
*   DATASERVING
*   CUSTOM
*   HADOOP: We recommend that you set this parameter to DATALAKE rather than HADOOP.

If the first time you create an EMR cluster is after 17:00 (UTC+8) on December 19, 2022, you cannot create a Hadoop, Data Science, Presto, or ZooKeeper cluster.

This parameter is required.', example='DATALAKE'),
  deletionProtection?: boolean(name='DeletionProtection', description='Specifies whether to enable release protection for the cluster. Valid values:

*   true: enables release protection for the cluster.
*   false: disables release protection for the cluster.

Default value: false.', example='false'),
  deployMode?: string(name='DeployMode', description='The deployment mode of master nodes in the cluster. Valid values:

*   NORMAL: regular mode. This is the default value. A cluster that contains only one master node is created.
*   HA: high availability mode. A cluster that contains at least three master nodes is created.', example='HA'),
  description?: string(name='Description', description='The cluster description.', example='Emr cluster for ETL'),
  nodeAttributes?: NodeAttributes(name='NodeAttributes', description='The attributes of all ECS instances.'),
  nodeGroups?: [
    NodeGroupConfig
  ](name='NodeGroups', description='The node groups. Number of elements in the array: 1 to 100.

This parameter is required.'),
  paymentType?: string(name='PaymentType', description='The billing method of the cluster. Valid values:

*   PayAsYouGo
*   Subscription

Default value: PayAsYouGo.', example='PayAsYouGo'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  releaseVersion?: string(name='ReleaseVersion', description='The EMR version. You can query available EMR versions in the EMR console.

This parameter is required.', example='EMR-5.16.0'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-acfmzabjyop****'),
  securityMode?: string(name='SecurityMode', description='The security mode of the cluster. Valid values:

*   NORMAL: regular mode. Kerberos authentication is disabled. This is the default value.
*   KERBEROS: Kerberos mode. Kerberos authentication is enabled.', example='NORMAL'),
  subscriptionConfig?: SubscriptionConfig(name='SubscriptionConfig', description='The subscription configurations. This parameter takes effect only if you set the PaymentType parameter to Subscription.'),
  tags?: [
    Tag
  ](name='Tags', description='The tags. Number of elements in the array: 0 to 20.'),
}

model RunClusterShrinkRequest {
  applicationConfigsShrink?: string(name='ApplicationConfigs', description='The application configurations. Number of elements in the array: 1 to 1000.'),
  applicationsShrink?: string(name='Applications', description='The services. Number of elements in the array: 1 to 100.

This parameter is required.'),
  bootstrapScriptsShrink?: string(name='BootstrapScripts', description='The bootstrap actions. Number of elements in the array: 1 to 10.'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. The same ClientToken value for multiple calls to the RunCluster operation results in identical responses. Only one cluster can be created by using the same ClientToken value.', example='A7D960FA-6DBA-5E07-8746-A63E3E4D****'),
  clusterName?: string(name='ClusterName', description='The cluster name. The name must be 1 to 128 characters in length. The name must start with a letter but cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).

This parameter is required.', example='emrtest'),
  clusterType?: string(name='ClusterType', description='The type of the cluster. Valid values:

*   DATALAKE
*   OLAP
*   DATAFLOW
*   DATASERVING
*   CUSTOM
*   HADOOP: We recommend that you set this parameter to DATALAKE rather than HADOOP.

If the first time you create an EMR cluster is after 17:00 (UTC+8) on December 19, 2022, you cannot create a Hadoop, Data Science, Presto, or ZooKeeper cluster.

This parameter is required.', example='DATALAKE'),
  deletionProtection?: boolean(name='DeletionProtection', description='Specifies whether to enable release protection for the cluster. Valid values:

*   true: enables release protection for the cluster.
*   false: disables release protection for the cluster.

Default value: false.', example='false'),
  deployMode?: string(name='DeployMode', description='The deployment mode of master nodes in the cluster. Valid values:

*   NORMAL: regular mode. This is the default value. A cluster that contains only one master node is created.
*   HA: high availability mode. A cluster that contains at least three master nodes is created.', example='HA'),
  description?: string(name='Description', description='The cluster description.', example='Emr cluster for ETL'),
  nodeAttributesShrink?: string(name='NodeAttributes', description='The attributes of all ECS instances.'),
  nodeGroupsShrink?: string(name='NodeGroups', description='The node groups. Number of elements in the array: 1 to 100.

This parameter is required.'),
  paymentType?: string(name='PaymentType', description='The billing method of the cluster. Valid values:

*   PayAsYouGo
*   Subscription

Default value: PayAsYouGo.', example='PayAsYouGo'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  releaseVersion?: string(name='ReleaseVersion', description='The EMR version. You can query available EMR versions in the EMR console.

This parameter is required.', example='EMR-5.16.0'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group.', example='rg-acfmzabjyop****'),
  securityMode?: string(name='SecurityMode', description='The security mode of the cluster. Valid values:

*   NORMAL: regular mode. Kerberos authentication is disabled. This is the default value.
*   KERBEROS: Kerberos mode. Kerberos authentication is enabled.', example='NORMAL'),
  subscriptionConfigShrink?: string(name='SubscriptionConfig', description='The subscription configurations. This parameter takes effect only if you set the PaymentType parameter to Subscription.'),
  tagsShrink?: string(name='Tags', description='The tags. Number of elements in the array: 0 to 20.'),
}

model RunClusterResponseBody = {
  clusterId?: string(name='ClusterId', description='The cluster ID.', example='c-b933c5aac7f7***'),
  operationId?: string(name='OperationId', description='The operation ID.', example='op-13c37a77c505****'),
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model RunClusterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunClusterResponseBody(name='body'),
}

/**
 * @summary Creates a pay-as-you-go or subscription E-MapReduce (EMR) cluster.
 *
 * @description RunCluster is an upgraded version of CreateCluster. RunCluster uses HTTPS POST requests and supports more parameters. Complex parameters, such as parameters of the object and array types, are in the JSON format and are more friendly for users who use CLI.
 *
 * @param tmpReq RunClusterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunClusterResponse
 */
async function runClusterWithOptions(tmpReq: RunClusterRequest, runtime: Util.RuntimeOptions): RunClusterResponse {
  Util.validateModel(tmpReq);
  var request = new RunClusterShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.applicationConfigs)) {
    request.applicationConfigsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.applicationConfigs, 'ApplicationConfigs', 'json');
  }
  if (!Util.isUnset(tmpReq.applications)) {
    request.applicationsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.applications, 'Applications', 'json');
  }
  if (!Util.isUnset(tmpReq.bootstrapScripts)) {
    request.bootstrapScriptsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.bootstrapScripts, 'BootstrapScripts', 'json');
  }
  if (!Util.isUnset(tmpReq.nodeAttributes)) {
    request.nodeAttributesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.nodeAttributes, 'NodeAttributes', 'json');
  }
  if (!Util.isUnset(tmpReq.nodeGroups)) {
    request.nodeGroupsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.nodeGroups, 'NodeGroups', 'json');
  }
  if (!Util.isUnset(tmpReq.subscriptionConfig)) {
    request.subscriptionConfigShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.subscriptionConfig, 'SubscriptionConfig', 'json');
  }
  if (!Util.isUnset(tmpReq.tags)) {
    request.tagsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.tags, 'Tags', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.applicationConfigsShrink)) {
    body['ApplicationConfigs'] = request.applicationConfigsShrink;
  }
  if (!Util.isUnset(request.applicationsShrink)) {
    body['Applications'] = request.applicationsShrink;
  }
  if (!Util.isUnset(request.bootstrapScriptsShrink)) {
    body['BootstrapScripts'] = request.bootstrapScriptsShrink;
  }
  if (!Util.isUnset(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!Util.isUnset(request.clusterName)) {
    body['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.clusterType)) {
    body['ClusterType'] = request.clusterType;
  }
  if (!Util.isUnset(request.deletionProtection)) {
    body['DeletionProtection'] = request.deletionProtection;
  }
  if (!Util.isUnset(request.deployMode)) {
    body['DeployMode'] = request.deployMode;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.nodeAttributesShrink)) {
    body['NodeAttributes'] = request.nodeAttributesShrink;
  }
  if (!Util.isUnset(request.nodeGroupsShrink)) {
    body['NodeGroups'] = request.nodeGroupsShrink;
  }
  if (!Util.isUnset(request.paymentType)) {
    body['PaymentType'] = request.paymentType;
  }
  if (!Util.isUnset(request.releaseVersion)) {
    body['ReleaseVersion'] = request.releaseVersion;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    body['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.securityMode)) {
    body['SecurityMode'] = request.securityMode;
  }
  if (!Util.isUnset(request.subscriptionConfigShrink)) {
    body['SubscriptionConfig'] = request.subscriptionConfigShrink;
  }
  if (!Util.isUnset(request.tagsShrink)) {
    body['Tags'] = request.tagsShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'RunCluster',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a pay-as-you-go or subscription E-MapReduce (EMR) cluster.
 *
 * @description RunCluster is an upgraded version of CreateCluster. RunCluster uses HTTPS POST requests and supports more parameters. Complex parameters, such as parameters of the object and array types, are in the JSON format and are more friendly for users who use CLI.
 *
 * @param request RunClusterRequest
 * @return RunClusterResponse
 */
async function runCluster(request: RunClusterRequest): RunClusterResponse {
  var runtime = new Util.RuntimeOptions{};
  return runClusterWithOptions(request, runtime);
}

model TagResourcesRequest {
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
  resourceIds?: [ string ](name='ResourceIds', description='The list of resource IDs. Valid values of N: 1 to 1.

This parameter is required.', example='cluster'),
  resourceType?: string(name='ResourceType', description='The type of the resource to which the tag belongs. Valid values:

*   cluster: cluster

This parameter is required.', example='cluster'),
  tags?: [
    Tag
  ](name='Tags', description='The tags.

This parameter is required.', example='[null]'),
}

model TagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='A964BDB2-0FDA-1037-AF3F-2633D5C3F20F'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @summary Bind tags to a specified EMR cluster.
 *
 * @param request TagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: Util.RuntimeOptions): TagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tags)) {
    query['Tags'] = request.tags;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'TagResources',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Bind tags to a specified EMR cluster.
 *
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All', description='Specifies whether to remove all tags. This parameter is valid only when the **Tagkeys** is empty. Valid values:

*   true: All the data is deleted.
*   false: Not all of them are deleted.

Default value: false', example='false'),
  regionId?: string(name='RegionId', description='The ID of the region in which you want to create the instance.

This parameter is required.', example='cn-hangzhou'),
  resourceIds?: [ string ](name='ResourceIds', description='The list of resource IDs.

This parameter is required.', example='cluster'),
  resourceType?: string(name='ResourceType', description='The type of the resource. Set the value to cluster.

This parameter is required.', example='cluster'),
  tagKeys?: [ string ](name='TagKeys', description='The key of the label. Valid values of N: 1 to 20.', example='["c-b933c5aac8fe****"]'),
}

model UntagResourcesResponseBody = {
  requestId?: string(name='RequestId', description='The ID of the request.', example='17A6A3D5-4B13-1DAD-9A23-66EA5FC83B50'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @summary Unbinds tags from a specified column in an EMR cluster. If the tag is not bound to other resources, the tag is automatically deleted.
 *
 * @param request UntagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: Util.RuntimeOptions): UntagResourcesResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.all)) {
    query['All'] = request.all;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceIds)) {
    query['ResourceIds'] = request.resourceIds;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.tagKeys)) {
    query['TagKeys'] = request.tagKeys;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UntagResources',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Unbinds tags from a specified column in an EMR cluster. If the tag is not bound to other resources, the tag is automatically deleted.
 *
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new Util.RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

model UpdateApiTemplateRequest {
  apiName?: string(name='ApiName', description='The name of the API operation. You can create only a cluster API operation template. Set the value to CreateCluster.

This parameter is required.', example='CreateCluster'),
  content?: string(name='Content', description='The content of the cluster API operation template. Set the value to JSON strings of the request parameters of the [CreateCluster](https://help.aliyun.com/document_detail/454393.html) API operation for creating a cluster.

This parameter is required.', example='CreateCluster'),
  regionId?: string(name='RegionId', description='区域ID。

This parameter is required.', example='cn-hangzhou'),
  resourceGroupId?: string(name='ResourceGroupId', description='资源组ID。', example='rg-acfmzabjyop****'),
  templateId?: string(name='TemplateId', description='集群模板id。

This parameter is required.', example='AT-****'),
  templateName?: string(name='TemplateName', description='集群模板名字。

This parameter is required.', example='DATALAKE模板'),
}

model UpdateApiTemplateResponseBody = {
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
  success?: boolean(name='Success', example='true', deprecated=true),
}

model UpdateApiTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateApiTemplateResponseBody(name='body'),
}

/**
 * @summary Updates an API operation template.
 *
 * @description 修改集群模板
 *
 * @param request UpdateApiTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateApiTemplateResponse
 */
async function updateApiTemplateWithOptions(request: UpdateApiTemplateRequest, runtime: Util.RuntimeOptions): UpdateApiTemplateResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!Util.isUnset(request.content)) {
    query['Content'] = request.content;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceGroupId)) {
    query['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!Util.isUnset(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!Util.isUnset(request.templateName)) {
    query['TemplateName'] = request.templateName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateApiTemplate',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates an API operation template.
 *
 * @description 修改集群模板
 *
 * @param request UpdateApiTemplateRequest
 * @return UpdateApiTemplateResponse
 */
async function updateApiTemplate(request: UpdateApiTemplateRequest): UpdateApiTemplateResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateApiTemplateWithOptions(request, runtime);
}

model UpdateApplicationConfigsRequest {
  applicationConfigs?: [
    UpdateApplicationConfig
  ](name='ApplicationConfigs', description='应用配置列表。

This parameter is required.'),
  applicationName?: string(name='ApplicationName', description='The application name.

This parameter is required.', example='HDFS'),
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-e6a9d46e9267****'),
  configAction?: string(name='ConfigAction', description='The operation performed on configuration items. Valid values:

*   ADD
*   UPDATE
*   DELETE', example='ADD'),
  configScope?: string(name='ConfigScope', description='The operation scope. Valid values:

*   CLUSTER
*   NODE_GROUP', example='CLUSTER'),
  description?: string(name='Description', description='The description.', example='更新YARN内存配置。'),
  nodeGroupId?: string(name='NodeGroupId', description='The node group ID.', example='ng-869471354ecd****'),
  nodeId?: string(name='NodeId', description='The node ID.', example='i-bp1cudc25w2bfwl5****'),
  refreshConfig?: boolean(name='RefreshConfig', description='Specifies whether to refresh the configurations. Default value: True.', example='true'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model UpdateApplicationConfigsResponseBody = {
  operationId?: string(name='OperationId', description='The operation ID.', example='op-13c37a77c505****'),
  requestId?: string(name='RequestId', description='The request ID.', example='9E3A7161-EB7B-172B-8D18-FFB06BA3****'),
}

model UpdateApplicationConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateApplicationConfigsResponseBody(name='body'),
}

/**
 * @param request UpdateApplicationConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateApplicationConfigsResponse
 */
async function updateApplicationConfigsWithOptions(request: UpdateApplicationConfigsRequest, runtime: Util.RuntimeOptions): UpdateApplicationConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.applicationName)) {
    query['ApplicationName'] = request.applicationName;
  }
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.configAction)) {
    query['ConfigAction'] = request.configAction;
  }
  if (!Util.isUnset(request.configScope)) {
    query['ConfigScope'] = request.configScope;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.nodeGroupId)) {
    query['NodeGroupId'] = request.nodeGroupId;
  }
  if (!Util.isUnset(request.nodeId)) {
    query['NodeId'] = request.nodeId;
  }
  if (!Util.isUnset(request.refreshConfig)) {
    query['RefreshConfig'] = request.refreshConfig;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  var bodyFlat : map[string]any = {};
  if (!Util.isUnset(request.applicationConfigs)) {
    bodyFlat['ApplicationConfigs'] = request.applicationConfigs;
  }
  body = {
    ...body,
    ...OpenApiUtil.query(bodyFlat),
  };

  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateApplicationConfigs',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UpdateApplicationConfigsRequest
 * @return UpdateApplicationConfigsResponse
 */
async function updateApplicationConfigs(request: UpdateApplicationConfigsRequest): UpdateApplicationConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateApplicationConfigsWithOptions(request, runtime);
}

model UpdateClusterAttributeRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  clusterName?: string(name='ClusterName', description='The cluster name.', example='emrtest'),
  deletionProtection?: boolean(name='DeletionProtection', description='Specifies whether release protection is enabled.', example='false'),
  description?: string(name='Description', description='The cluster description.', example='Emr cluster for ETL'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
}

model UpdateClusterAttributeResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model UpdateClusterAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateClusterAttributeResponseBody(name='body'),
}

/**
 * @summary Update cluster attributes.
 *
 * @param request UpdateClusterAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateClusterAttributeResponse
 */
async function updateClusterAttributeWithOptions(request: UpdateClusterAttributeRequest, runtime: Util.RuntimeOptions): UpdateClusterAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.clusterName)) {
    query['ClusterName'] = request.clusterName;
  }
  if (!Util.isUnset(request.deletionProtection)) {
    query['DeletionProtection'] = request.deletionProtection;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateClusterAttribute',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Update cluster attributes.
 *
 * @param request UpdateClusterAttributeRequest
 * @return UpdateClusterAttributeResponse
 */
async function updateClusterAttribute(request: UpdateClusterAttributeRequest): UpdateClusterAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateClusterAttributeWithOptions(request, runtime);
}

model UpdateScriptRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  script?: Script(name='Script', description='The script.

This parameter is required.'),
  scriptId?: string(name='ScriptId', description='The script ID.

This parameter is required.', example='cs-da7476a7679a4d4c9cede62ebe09****'),
  scriptType?: string(name='ScriptType', description='The type of the script. Valid values:

*   BOOTSTRAP: indicates a bootstrap action of the Elastic Compute Service (ECS) instance.
*   NORMAL: indicates a common script.

This parameter is required.', example='BOOTSTRAP'),
}

model UpdateScriptShrinkRequest {
  clusterId?: string(name='ClusterId', description='The cluster ID.

This parameter is required.', example='c-b933c5aac8fe****'),
  regionId?: string(name='RegionId', description='The region ID.

This parameter is required.', example='cn-hangzhou'),
  scriptShrink?: string(name='Script', description='The script.

This parameter is required.'),
  scriptId?: string(name='ScriptId', description='The script ID.

This parameter is required.', example='cs-da7476a7679a4d4c9cede62ebe09****'),
  scriptType?: string(name='ScriptType', description='The type of the script. Valid values:

*   BOOTSTRAP: indicates a bootstrap action of the Elastic Compute Service (ECS) instance.
*   NORMAL: indicates a common script.

This parameter is required.', example='BOOTSTRAP'),
}

model UpdateScriptResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model UpdateScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateScriptResponseBody(name='body'),
}

/**
 * @summary Updates a bootstrap action or a common script of an E-MapReduce (EMR) cluster.
 *
 * @param tmpReq UpdateScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateScriptResponse
 */
async function updateScriptWithOptions(tmpReq: UpdateScriptRequest, runtime: Util.RuntimeOptions): UpdateScriptResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateScriptShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.script)) {
    request.scriptShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.script, 'Script', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scriptShrink)) {
    query['Script'] = request.scriptShrink;
  }
  if (!Util.isUnset(request.scriptId)) {
    query['ScriptId'] = request.scriptId;
  }
  if (!Util.isUnset(request.scriptType)) {
    query['ScriptType'] = request.scriptType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateScript',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Updates a bootstrap action or a common script of an E-MapReduce (EMR) cluster.
 *
 * @param request UpdateScriptRequest
 * @return UpdateScriptResponse
 */
async function updateScript(request: UpdateScriptRequest): UpdateScriptResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateScriptWithOptions(request, runtime);
}

model UpdateUserAttributeRequest {
  clusterId?: string(name='ClusterId', description='集群ID。

This parameter is required.', example='c-b933c5aac8fe****'),
  description?: string(name='Description', description='用户备注。', example='test'),
  password?: string(name='Password', description='用户密码。', example='1234'),
  regionId?: string(name='RegionId', description='区域ID。

This parameter is required.', example='cn-hangzhou'),
  userId?: string(name='UserId', description='用户ID。', example='125046002175****', deprecated=true),
  userName?: string(name='UserName', example='yun****'),
}

model UpdateUserAttributeResponseBody = {
  data?: boolean(name='Data', example='true', deprecated=true),
  requestId?: string(name='RequestId', description='请求ID。', example='DD6B1B2A-5837-5237-ABE4-FF0C8944****'),
}

model UpdateUserAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateUserAttributeResponseBody(name='body'),
}

/**
 * @param request UpdateUserAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateUserAttributeResponse
 */
async function updateUserAttributeWithOptions(request: UpdateUserAttributeRequest, runtime: Util.RuntimeOptions): UpdateUserAttributeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.clusterId)) {
    query['ClusterId'] = request.clusterId;
  }
  if (!Util.isUnset(request.description)) {
    query['Description'] = request.description;
  }
  if (!Util.isUnset(request.password)) {
    query['Password'] = request.password;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.userId)) {
    query['UserId'] = request.userId;
  }
  if (!Util.isUnset(request.userName)) {
    query['UserName'] = request.userName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateUserAttribute',
    version = '2021-03-20',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if (Util.isUnset(@signatureVersion) || !Util.equalString(@signatureVersion, 'v4')) {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UpdateUserAttributeRequest
 * @return UpdateUserAttributeResponse
 */
async function updateUserAttribute(request: UpdateUserAttributeRequest): UpdateUserAttributeResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateUserAttributeWithOptions(request, runtime);
}

